コード例 #1
0
        public T GetSDK <T>()
        {
            if (typeof(T).Name == nameof(IDetectFaceSDK))
            {
                if (mDetectFace == null)
                {
                    mDetectFace = new DetectFaceSDK();
                    mDetectFace.Init();
                }
                else
                {
                }

                return((T)mDetectFace);
            }
            else if (typeof(T).Name == nameof(IHuaweiSDK))
            {
                if (mHuaweiSdk == null)
                {
                    mHuaweiSdk = new SDKHuawei();
                    mHuaweiSdk.Init();
                }
                else
                {
                }

                return((T)mHuaweiSdk);
            }
            else
            {
            }

            return((T)mPlatformSdk);
        }
コード例 #2
0
        public SDKManager()
        {
            ISDKCreator creator = null;

            switch (Application.platform)
            {
            case RuntimePlatform.IPhonePlayer:
                creator = SDKCreatorFactory.GetCreator(PlatformType.IOS);
                break;

            case RuntimePlatform.Android:
                creator = SDKCreatorFactory.GetCreator(PlatformType.Android);
                break;

            default:
                creator = SDKCreatorFactory.GetCreator(PlatformType.Default);
                break;
            }

            if (creator != null)
            {
                mPlatformSdk = creator.Create();
            }
            else
            {
            }
        }
コード例 #3
0
ファイル: SDKManager.cs プロジェクト: joyhooei/GameDemos
    public void Init()
    {
                #if UNITY_EDITOR
        sdk = new EditorSDK();
        BuglyAgent.ConfigDebugMode(true);
                #elif UNITY_ANDROID
        //sdk = new EditorSDK();
        sdk = new AndroidSDK();
        BuglyAgent.ConfigDebugMode(false);
        //BuglyAgent.InitWithAppId ("79668fd96a");
                #elif UNITY_IPHONE
        sdk = new IosSDK();
        BuglyAgent.ConfigDebugMode(false);
        BuglyAgent.InitWithAppId("0d4290d8fc");
        #endif
        BuglyAgent.EnableExceptionHandler();
        sdk.Init();

        if (!Main.Instance.UserManager.HasUserId())
        {
            GetDeviceID();
        }
    }