feat: backend state machine, Unity URL prod, simplify GameSetup
This commit is contained in:
@@ -12,9 +12,7 @@ public class NetworkManager : MonoBehaviour
|
||||
{
|
||||
public static NetworkManager Instance { get; private set; }
|
||||
|
||||
[Header("Connection")]
|
||||
[Tooltip("Colyseus server endpoint (overridden by frontend via SetServerURL)")]
|
||||
public string serverURL = "ws://localhost:2567";
|
||||
private const string serverURL = "wss://rolld.io:2567";
|
||||
|
||||
[Header("Prefab")]
|
||||
[Tooltip("Prefab for remote players (must have RemotePlayerController)")]
|
||||
@@ -94,13 +92,6 @@ public class NetworkManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Called from frontend JS via SendMessage to override the server URL.</summary>
|
||||
public void SetServerURL(string url)
|
||||
{
|
||||
serverURL = url;
|
||||
Debug.Log($"[Network] Server URL set to: {url}");
|
||||
}
|
||||
|
||||
public NetworkPlayer GetLocalPlayerState()
|
||||
{
|
||||
if (_room == null || _room.State.players == null || string.IsNullOrEmpty(LocalSessionId)) return null;
|
||||
|
||||
Reference in New Issue
Block a user