void Awake() { if (!mInstance) mInstance = this; else { Destroy(this.gameObject); return; } DontDestroyOnLoad(this.gameObject); loginManager = GetComponent<LoginManager>(); facebookFriends = GetComponent<FacebookFriends>(); userData = GetComponent<UserData>(); userHiscore = GetComponent<UserHiscore>(); ranking = GetComponent<Ranking>(); challengesManager = GetComponent<ChallengersManager>(); challengeData = GetComponent<ChallengeData>(); userData.Init(); }
void Awake() { if (!mInstance) { mInstance = this; } else { Destroy(this.gameObject); return; } DontDestroyOnLoad(this.gameObject); loginManager = GetComponent <LoginManager>(); facebookFriends = GetComponent <FacebookFriends>(); userData = GetComponent <UserData>(); userHiscore = GetComponent <UserHiscore>(); ranking = GetComponent <Ranking>(); challengesManager = GetComponent <ChallengersManager>(); challengeData = GetComponent <ChallengeData>(); userData.Init(); }