コード例 #1
0
    void OnEnable()
    {
        MojingLog.LogTrace("Enter Mojing.OnEnable");
        if (VRModeEnabled)
        {
            MojingSDK.Unity_EnterMojingWorld(GlassesKey, UseTimeWarp);
        }

#if UNITY_IOS
        MojingSDK.Unity_StartTracker(100);
#endif

        bWaitForMojingWord = true;
        heads = FindObjectsOfType <MojingVRHead>();
        //frameCount = 0;
        StartCoroutine("EndOfFrame");
        MojingLog.LogTrace("Leave Mojing.OnEnable  ");
    }
コード例 #2
0
    void OnEnable()
    {
        MojingLog.LogTrace("Enter Mojing.OnEnable");
        if (MojingVRHead.Instance.VRModeEnabled)
        {
            EnterMojingWorld();
        }
#if UNITY_IOS
        MojingSDK.Unity_StartTracker(100);
#endif

        bWaitForMojingWord = true;
        heads = FindObjectsOfType <MojingVRHead>();
        if (!g_bStartEndofFrame)
        {
            g_bStartEndofFrame = true;
            getTextureID(iFrameIndex);
            StartCoroutine(EndOfFrame());
        }
        MojingLog.LogTrace("Leave Mojing.OnEnable");
    }
コード例 #3
0
ファイル: Mojing.cs プロジェクト: johndpope/SphereMoviePlayer
    void OnEnable()
    {
        MojingLog.LogTrace("Enter Mojing.OnEnable");
        if (VRModeEnabled)
        {
            MojingSDK.Unity_EnterMojingWorld(GlassesKey, ConfigItem.MT_STATE, ConfigItem.TW_STATE);
            if (SystemInfo.graphicsDeviceType == UnityEngine.Rendering.GraphicsDeviceType.Metal && !MojingSDK.Unity_IsGlassesNeedDistortionByName(glassesKey) && !ConfigItem.TW_STATE)
            {
                MojingSDK.Unity_DestroyMetalLayer();
            }
        }

#if UNITY_IOS
        MojingSDK.Unity_StartTracker(100);
#endif

        bWaitForMojingWord = true;
        heads = FindObjectsOfType <MojingVRHead>();
        //frameCount = 0;
        StartCoroutine("EndOfFrame");
        MojingLog.LogTrace("Leave Mojing.OnEnable  ");
    }