예제 #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 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();
        }
    }