Example #1
0
    public void InitPlatform(System.Action <bool> initResult)
    {
            #if (UNITY_ANDROID && !UNITY_EDITOR)
#if ANDROID_UC
        //设置日志级别
        UCGameSdk.setLogLevel(UCConfig.logLevel);
        //设置屏幕方向
        UCGameSdk.setOrientation(UCConfig.orientation);

        //设置使用登录界面类型
        UCGameSdk.setLoginUISwitch(UCConfig.loginUISwitch);

        UCGameSdk.initSDK(UCConfigData.debugMode, UCConfigData.logLevel, UCConfigData.cpid, UCConfigData.gameid,
                          UCConfigData.serverid, UCConfigData.servername, UCConfigData.enablePayHistory, UCConfigData.enableLogout);
#endif
#endif
    }
    public static void InitSDK()
    {
#if UNITY_ANDROID
        Debug.Log("UCSDKAgent::InitSDK");

        //设置日志级别
        UCGameSdk.setLogLevel(UCConstants.LOGLEVEL_DEBUG);

        //设置屏幕方向
        UCGameSdk.setOrientation(UCConstants.ORIENTATION_LANDSCAPE);

        //调用初始化
        // UCGameSdk.initSDK (true, 2, 1, 20, 24, "firstService", false, false);
        UCGameSdk.initSDK(debugMode, UCConstants.LOGLEVEL_ERROR,
                          cpid, gameid, serverid, "firstService",
                          true, true);
#elif UNITY_IPHONE
#endif
    }