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 }
public void Init() { Instance = this; session = new Session(); PCKE = new PCKE(); URL_SCHEME = $"https://{QuartersInit.Instance.APP_UNIQUE_IDENTIFIER}.games.poq.gg";; }
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(); }
public void Init() { Instance = this; }