Skip to content

Commit 37b1704

Browse files
Explain Unity WebGL preprocessor guard
1 parent 84086e7 commit 37b1704

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

docs/docs/00100-intro/00300-tutorials/00300-unity-tutorial/00300-part-2.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,9 @@ public class GameManager : MonoBehaviour
752752
void HandleConnect(DbConnection _conn, Identity identity, string token)
753753
{
754754
Debug.Log("Connected.");
755+
// Only the WebGL player has the browser WebSocket header limitation.
756+
// The Unity Editor uses the normal desktop transport even when the
757+
// selected build target is WebGL, so keep the normal behavior there.
755758
#if UNITY_WEBGL && !UNITY_EDITOR
756759
if (AuthToken.Token == "")
757760
{

docs/docs/00100-intro/00300-tutorials/00300-unity-tutorial/00400-part-3.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,6 +1364,9 @@ Next lets add some callbacks when rows change in the database. Modify the `Handl
13641364
void HandleConnect(DbConnection conn, Identity identity, string token)
13651365
{
13661366
Debug.Log("Connected.");
1367+
// Only the WebGL player has the browser WebSocket header limitation.
1368+
// The Unity Editor uses the normal desktop transport even when the
1369+
// selected build target is WebGL, so keep the normal behavior there.
13671370
#if UNITY_WEBGL && !UNITY_EDITOR
13681371
if (AuthToken.Token == "")
13691372
{

0 commit comments

Comments
 (0)