Пример #1
0
        public static void SyncSDKs()
        {
            if (TBEditorSDKSettings.GetNumActiveSDKs() == 0)
            {
                Debug.LogError("No platforms are currently enabled in TButt Core Settings. Please enable at least one platform in the Core Settings menu.");
            }
            else
            {
                _sdks = TBEditorSDKSettings.GetEditorSDKs();

                if (!_sdks.forceSync)
                {
                    return;
                }
                else
                {
                    TBEditorSDKSettings.SetScriptingDefines(_sdks);
                }

                if (!PlayerSettings.virtualRealitySupported)
                {
                    PlayerSettings.virtualRealitySupported = true;
                }

                TBEditorDefines.SetUnityVirtualRealitySDKs(_sdks);
            }
        }
Пример #2
0
 static void SaveAllSettings()
 {
     foreach (KeyValuePair <string, TBEditorServiceSettingsBase> entry in _serviceSettings)
     {
         SaveServiceSettings(entry.Value.GetService());
     }
     SaveEditorSettings();
     TBEditorDefines.SetScriptingDefines();
 }
Пример #3
0
        public static void SetTButtService(VRService service)
        {
            services = GetServicesStruct(service);

            TBEditorDefines.SetPlatformDefine(oculusServiceDef, services.oculus);
            TBEditorDefines.SetPlatformDefine(steamServiceDef, services.steam);
            TBEditorDefines.SetPlatformDefine(xboxServiceDef, services.xbox);
            #if TB_HAS_UNITY_PS4
            TBEditorDefines.SetPlatformDefine(psnServiceDef, services.psn);
            #endif
        }
Пример #4
0
 public static void SetScriptingDefines(SDKs sdks)
 {
     TBEditorDefines.SetPlatformDefine(TBEditorDefines.logsDef, sdks.logs);
     TBEditorDefines.SetPlatformDefine(TBEditorDefines.oculusDef, sdks.oculus);
     TBEditorDefines.SetPlatformDefine(TBEditorDefines.steamVRDef, sdks.steamVR);
     TBEditorDefines.SetPlatformDefine(TBEditorDefines.googleDef, sdks.googleVR);
     #if TB_HAS_UNITY_PS4
     TBEditorDefines.SetPlatformDefine(TBEditorDefines.psvrDef, sdks.psvr);
     #endif
     TBEditorDefines.SetPlatformDefine(TBEditorDefines.windowsDef, sdks.windows);
     TBEditorDefines.SetScriptingDefines();
     TBEditorDefines.SetUnityVirtualRealitySDKs(sdks);
 }
Пример #5
0
        public static void SetTButtSDKForPlatform(TButt.VRPlatform platform)
        {
            switch (platform)
            {
            case VRPlatform.OculusPC:
            case VRPlatform.OculusMobile:
                PlayerSettings.SetVirtualRealitySDKs(BuildTargetGroup.Standalone, new string[] { TBSettings.VRDeviceNames.Oculus });
                PlayerSettings.SetVirtualRealitySDKs(BuildTargetGroup.Android, new string[] { TBSettings.VRDeviceNames.Oculus });
                TBEditorDefines.SetPlatformDefine(steamVRDef, false);
                TBEditorDefines.SetPlatformDefine(oculusDef, true);
                break;

            case VRPlatform.SteamVR:
                PlayerSettings.SetVirtualRealitySDKs(BuildTargetGroup.Standalone, new string[] { TBSettings.VRDeviceNames.SteamVR });
                TBEditorDefines.SetPlatformDefine(steamVRDef, true);
                TBEditorDefines.SetPlatformDefine(oculusDef, false);
                break;
            }
        }