Skip to content
This repository has been archived by the owner on Jul 27, 2021. It is now read-only.

Commit

Permalink
chore: update WSSController LOCAL_COMMS param and UnloadScene support (
Browse files Browse the repository at this point in the history
…#526)

* Updated fabricated url to have LOCAL_COMMS param. 

* Added UnloadScene support in WSSController

* Updated the use of LOCAL_COMMS param to be toggleable from editor
  • Loading branch information
pravusjif authored Jun 26, 2019
1 parent 5a9bfa7 commit 3986f74
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Assets/Scripts/MainScripts/Debugging/WSS/WSSController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public enum DebugPanel

public bool openBrowserWhenStart;
public bool useClientDebugMode = true;
public bool forceLocalComms = true;
public Vector2 startInCoords = new Vector2(-99, 109);

public DebugPanel debugPanelMode = DebugPanel.Off;
Expand All @@ -119,6 +120,10 @@ private void OnEnable()
{
debugString = "DEBUG_MODE&LOCAL_COMMS&";
}
else if(forceLocalComms)
{
debugString = "LOCAL_COMMS&";
}

string debugPanelString = "";
if (debugPanelMode == DebugPanel.Engine)
Expand All @@ -131,7 +136,7 @@ private void OnEnable()
}

Application.OpenURL(
$"http://localhost:8080/?{debugString}{debugPanelString}&position={startInCoords.x}%2C{startInCoords.y}&ws=ws%3A%2F%2Flocalhost%3A5000%2Fdcl");
$"http://localhost:8080/?{debugString}{debugPanelString}position={startInCoords.x}%2C{startInCoords.y}&ws=ws%3A%2F%2Flocalhost%3A5000%2Fdcl");
}
#else
useClientDebugMode = false;
Expand Down Expand Up @@ -181,6 +186,9 @@ void Update()
case "LoadParcelScenes":
sceneController.LoadParcelScenes(msg.payload);
break;
case "UnloadScene":
sceneController.UnloadScene(msg.payload);
break;
case "SetPosition":
characterController.SetPosition(msg.payload);
break;
Expand Down

0 comments on commit 3986f74

Please sign in to comment.