void Awake() { api = StardomAPI.Instance; api.RegisterDisconnectHandler(delegate { Debug.Log("Disconnected, user disconnected"); }); }
void Awake() { api = StardomAPI.Instance; api.RegisterDisconnectHandler(delegate { Debug.Log("Disconnected"); if (apiInitDone) { api.GetUserProfile(UserProfileCallback); } }); }
void OnLevelWasLoaded(int level) { //prevent multiple instances of singleton and force it presist through all levels if (instance == null) { instance = this; } if (this != instance) { Destroy(this); } else { DontDestroyOnLoad(this); } }