예제 #1
0
    void Awake()
    {
        DebugConsole.Instance.enabled = false;
#if UNITY_EDITOR
        if (!AutoUpdateScene.jumped)
        {
            return;
        }
#endif
        Instance = this;
        SetKey();
        ProgressBar.Show();
        //gameObject.AddComponent<Main>();
        if (User_Config.internal_sdk == 1)
        {
            SDKCallback.InitCallback();
#if UNITY_ANDROID && !UNITY_EDITOR
            AndroidJavaClass  jc = new AndroidJavaClass("com.unity3d.player.UnityActivity");
            AndroidJavaObject jo = jc.GetStatic <AndroidJavaObject>("currentActivity");
            SDKInterface.sdkInit = jo.Call <bool>("isFDSDKinitOk");
#else
            SDKInterface.sdkInit = true;
#endif
            SDKInterface.Instance.Init();
            StartCoroutine(WaitForSDKInit());
        }
        else
        {
            StartUp();
        }
    }
예제 #2
0
 static int InitCallback(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 0);
         SDKCallback o = SDKCallback.InitCallback();
         ToLua.PushSealed(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
예제 #3
0
    private static int InitCallback(IntPtr L)
    {
        int result;

        try
        {
            ToLua.CheckArgsCount(L, 0);
            SDKCallback obj = SDKCallback.InitCallback();
            ToLua.Push(L, obj);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaDLL.toluaL_exception(L, e, null);
        }
        return(result);
    }