void Awake() { if (Instance != null) { DestroyImmediate(this); return; } Server = new WebSocketServer(Port); Server.AddWebSocketService <SimulatorClient>("/"); Server.Start(); DontDestroyOnLoad(this); Instance = this; }
void Awake() { groundLayer = LayerMask.NameToLayer("Ground And Road"); if (Instance != null) { DestroyImmediate(this); return; } Server = new WebSocketServer(Port); Server.AddWebSocketService <SimulatorClient>("/"); Server.Start(); DontDestroyOnLoad(gameObject); Instance = this; }