// Token: 0x0600012B RID: 299 RVA: 0x0000412A File Offset: 0x0000232A
 private static AsyncExec getAsyncImpl()
 {
     if (!AsyncExec.init)
     {
         AsyncExec.getImpl();
     }
     return(AsyncExec.asyncImpl);
 }
示例#2
0
        public override void init(string gameId, bool testModeEnabled, string gameObjectName, string unityVersion)
        {
            if (initialized)
            {
                return;
            }
            initialized = true;

            Utils.LogDebug("UnityEditor: init(), gameId=" + gameId + ", testModeEnabled=" + testModeEnabled + ", gameObjectName=" + gameObjectName);

            string url = "https://impact.applifier.com/mobile/campaigns?platform=editor&gameId=" + WWW.EscapeURL(gameId) + "&unityVersion=" + WWW.EscapeURL(unityVersion);

            AsyncExec.runWithCallback <string, WWW> (getAdPlan, url, handleResponse);
        }
示例#3
0
        private static MonoBehaviour getImpl()
        {
            if (!init)
            {
                asyncImpl           = new AsyncExec();
                asyncExecGameObject = new GameObject("Unity Ads Coroutine Host")
                {
                    hideFlags = HideFlags.HideAndDontSave
                };
                coroutineHost = asyncExecGameObject.AddComponent <MonoBehaviour>();
                Object.DontDestroyOnLoad(asyncExecGameObject);
                init = true;
            }

            return(coroutineHost);
        }
 // Token: 0x0600012C RID: 300 RVA: 0x00004141 File Offset: 0x00002341
 public static void runWithCallback <K, T>(Func <K, Action <T>, IEnumerator> asyncMethod, K arg0, Action <T> callback)
 {
     AsyncExec.getImpl().StartCoroutine(asyncMethod(arg0, callback));
 }