Quantcast
Channel: Questions in topic: "build"
Viewing all articles
Browse latest Browse all 4084

OnServerStart not being called in standalone build. Works in editor.

$
0
0
Unity 5.5.2f1 I have implemented an override of OnServerStart in my GameMananager class: public class GameManager : NetworkBehaviour { static GameManager _manager = null; public static GameManager Instance { get { return _manager; } } ShipManager _shipManager; void Awake() { if (_manager == null) _manager = this; else if(_manager != this) Destroy(gameObject); DontDestroyOnLoad(gameObject); _shipManager = GetComponent(); } #region Overrides of NetworkBehaviour public override void OnStartServer() { base.OnStartServer(); Debug.Log("OnStartServer Running..."); _shipManager.LoadShips(); } #endregion } When I run in the editor as "Host", OnStartServer runs and my ships are created. However, when I build and run in standalone mode, nothing happens. The log does not indicate that OnStartServer was ever called. What am I missing here?

Viewing all articles
Browse latest Browse all 4084

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>