コード例 #1
0
        public void Init()
        {
            if (string.IsNullOrEmpty(APP_ID))
            {
                Debug.LogError("Quarters App Id is empty");
            }
            if (string.IsNullOrEmpty(APP_KEY))
            {
                Debug.LogError("Quarters App key is empty");
            }
            if (string.IsNullOrEmpty(SERVER_API_TOKEN))
            {
                Debug.LogError("Quarters Server Token key is empty");
            }


            GameObject quarters = new GameObject("Quarters");

            quarters.transform.SetParent(this.transform);
            DontDestroyOnLoad(quarters.gameObject);

            instance = quarters.AddComponent <Quarters>();
            instance.Init();

            #if QUARTERS_MODULE_PLAYFAB
            GameObject quartersIAP = new GameObject("QuartersIAP");
            quartersIAP.transform.SetParent(this.transform);
            DontDestroyOnLoad(quartersIAP.gameObject);
            quartersIAP.AddComponent <QuartersIAP>();
            #endif
        }
コード例 #2
0
ファイル: Quarters.cs プロジェクト: weiks/quarters-unity-sdk
        public void Init()
        {
            Instance = this;
            session  = new Session();

            PCKE       = new PCKE();
            URL_SCHEME = $"https://{QuartersInit.Instance.APP_UNIQUE_IDENTIFIER}.games.poq.gg";;
        }
コード例 #3
0
        public void Init(Action OnInitComplete, Action <string> OnInitError)
        {
            Debug.Log("Quarters Init:");

            string error = "";

            if (string.IsNullOrEmpty(APP_ID))
            {
                Debug.LogError("Quarters App Id is empty");
            }
            if (string.IsNullOrEmpty(APP_KEY))
            {
                Debug.LogError("Quarters App key is empty");
            }


            GameObject quarters = new GameObject("Quarters");

            quarters.transform.SetParent(this.transform);
            DontDestroyOnLoad(quarters.gameObject);

            Quarters quartersComponent = quarters.AddComponent <Quarters>();

            quartersComponent.Init();

            GameObject quartersWebView = new GameObject("QuartersWebView");

            quarters.transform.SetParent(this.transform);
            QuartersWebView webViewComponent = quarters.AddComponent <QuartersWebView>();

            quartersComponent.QuartersWebView = webViewComponent;
            webViewComponent.Init();
            DontDestroyOnLoad(quartersWebView.gameObject);


            Debug.Log("QuartersInit complete");
            QuartersInit.OnInitComplete?.Invoke();
            OnInitComplete?.Invoke();
        }
コード例 #4
0
ファイル: Quarters.cs プロジェクト: weiks/q-slots
 public void Init()
 {
     Instance = this;
 }