void OnLoaded(ServerConnect.UserDataInServer dataLoaded) { hiscoresByMissions.Init(); if (Data.Instance.playMode == Data.PlayModes.STORYMODE || Data.Instance.playMode == Data.PlayModes.SURVIVAL) { Data.Instance.events.OnSaveScore += OnSaveScore; } if (dataLoaded != null && dataLoaded.username != "") { logged = true; userID = dataLoaded.userID; username = dataLoaded.username; score = dataLoaded.score; missionUnblockedID_1 = dataLoaded.missionUnblockedID_1; missionUnblockedID_2 = dataLoaded.missionUnblockedID_2; missionUnblockedID_3 = dataLoaded.missionUnblockedID_3; onlyLocal = false; } else { onlyLocal = true; } print("User data loaded: " + userID + " username: "******" logged: " + logged + " onlyLocal: " + onlyLocal); }
void OnLoaded(ServerConnect.UserDataInServer dataLoaded) { if (dataLoaded != null && dataLoaded.username != "") { userID = dataLoaded.userID; username = dataLoaded.username; print("User data loaded: " + userID + " username: " + username); } }