Beispiel #1
0
        public bool CreateSession(string cbGameObject)
        {
            if (!ConfigurationManager.CheckConfiguration())
            {
                Log.Debug("[NMGPlayMode.SessionManager] CreateSession Fail ");
                return(false);
            }

            testData = TestData.Instance;

            if (status == SessionStatus.NONE)
            {
                status = SessionStatus.INITIALIZING;

                playerId = NMGPlayerPrefs.GetPlayerId();

                if (string.IsNullOrEmpty(playerId))
                {
                    playerId = Guid.NewGuid().ToString().Replace("-", "").ToUpper();
                    NMGPlayerPrefs.SetPlayerId(playerId);
                    Log.Debug("[NMGPlayMode.SessionManager] Save new PlayerID : " + playerId);
                }

                GMC2ServiceManager.Instance.Initialize(OnCreateSession);

                CheckTermsOfServiceKit();
                return(true);
            }
            else
            {
                Log.Debug("[NMGPlayMode.SessionManager] CreateSession Fail");
                return(false);
            }
        }