private void Stereo360CaptureGUI(BuildTargetGroup targetGroup)
 {
     if (BuildTargetDiscovery.PlatformGroupHasVRFlag(targetGroup, VRAttributes.SupportStereo360Capture))
     {
         EditorGUILayout.PropertyField(m_Enable360StereoCapture, Styles.stereo360CaptureCheckbox);
     }
 }
        internal void VuforiaGUI(BuildTargetGroup targetGroup)
        {
            if (!BuildTargetDiscovery.PlatformGroupHasVRFlag(targetGroup, VRAttributes.SupportVuforia) ||
                !m_VuforiaInstalled)
            {
                return;
            }

            // Disable toggle when Vuforia is in the VRDevice list and VR Supported == true
            bool vuforiaEnabled;
            var  shouldDisableScope = VREditor.GetVREnabledOnTargetGroup(targetGroup) && GetVRDeviceElementIsInList(targetGroup, "Vuforia");

            using (new EditorGUI.DisabledScope(shouldDisableScope))
            {
                if (shouldDisableScope && !PlayerSettings.GetPlatformVuforiaEnabled(targetGroup)) // Force Vuforia AR on if Vuforia is in the VRDevice List
                {
                    PlayerSettings.SetPlatformVuforiaEnabled(targetGroup, true);
                }

                vuforiaEnabled = PlayerSettings.GetPlatformVuforiaEnabled(targetGroup);

                EditorGUI.BeginChangeCheck();
                vuforiaEnabled = EditorGUILayout.Toggle(EditorGUIUtility.TrTextContent("Vuforia Augmented Reality Supported"), vuforiaEnabled);
                if (EditorGUI.EndChangeCheck())
                {
                    PlayerSettings.SetPlatformVuforiaEnabled(targetGroup, vuforiaEnabled);
                }
            }

            if (shouldDisableScope)
            {
                EditorGUILayout.HelpBox("Vuforia Augmented Reality is required when using the Vuforia Virtual Reality SDK.", MessageType.Info);
            }
        }
        internal void VuforiaGUI(BuildTargetGroup targetGroup)
        {
            // Vuforia is not supported in the Linux Editor
            if (Application.platform == RuntimePlatform.LinuxEditor)
                return;

            if (!BuildTargetDiscovery.PlatformGroupHasVRFlag(targetGroup, VRAttributes.SupportVuforia))
                return;

            m_SharedSettingShown = true;

            // Disable toggle when Vuforia is in the VRDevice list and VR Supported == true
            bool vuforiaEnabled;
            var shouldDisableScope = VREditor.GetVREnabledOnTargetGroup(targetGroup) && GetVRDeviceElementIsInList(targetGroup, "Vuforia");
            using (new EditorGUI.DisabledScope(shouldDisableScope))
            {
                if (shouldDisableScope && !PlayerSettings.vuforiaEnabled) // Force Vuforia AR on if Vuforia is in the VRDevice List
                    PlayerSettings.vuforiaEnabled = true;

                vuforiaEnabled = PlayerSettings.vuforiaEnabled;

                EditorGUI.BeginChangeCheck();
                vuforiaEnabled = EditorGUILayout.Toggle(EditorGUIUtility.TrTextContent("Vuforia Augmented Reality Supported*"), vuforiaEnabled);
                if (EditorGUI.EndChangeCheck())
                {
                    PlayerSettings.vuforiaEnabled = vuforiaEnabled;
                }
            }

            if (shouldDisableScope)
            {
                EditorGUILayout.HelpBox("Vuforia Augmented Reality is required when using the Vuforia Virtual Reality SDK.", MessageType.Info);
            }
        }
 private static GUIContent[] GetStereoRenderingPaths(BuildTargetGroup targetGroup)
 {
     if (BuildTargetDiscovery.PlatformGroupHasVRFlag(targetGroup, VRAttributes.SupportStereoMultiviewRendering))
     {
         return(Styles.kMultiviewStereoRenderingPaths);
     }
     return(Styles.kDefaultStereoRenderingPaths);
 }
        internal void TangoGUI(BuildTargetGroup targetGroup)
        {
            if (!BuildTargetDiscovery.PlatformGroupHasVRFlag(targetGroup, VRAttributes.SupportTango))
                return;

            // Google Tango settings
            EditorGUILayout.PropertyField(m_AndroidEnableTango, EditorGUIUtility.TrTextContent("ARCore Supported"));
        }
        private bool IsStereoRenderingModeSupported(BuildTargetGroup targetGroup, StereoRenderingPath stereoRenderingPath)
        {
            switch (stereoRenderingPath)
            {
            case StereoRenderingPath.MultiPass:
                return(true);

            case StereoRenderingPath.SinglePass:
                return(BuildTargetDiscovery.PlatformGroupHasVRFlag(targetGroup, VRAttributes.SupportSinglePassStereoRendering));

            case StereoRenderingPath.Instancing:
                return(BuildTargetDiscovery.PlatformGroupHasVRFlag(targetGroup, VRAttributes.SupportStereoInstancingRendering));
            }

            return(false);
        }
 internal bool TargetGroupSupportsAugmentedReality(BuildTargetGroup targetGroup)
 {
     return(BuildTargetDiscovery.PlatformGroupHasVRFlag(targetGroup, VRAttributes.SupportVuforia) ||
            BuildTargetDiscovery.PlatformGroupHasVRFlag(targetGroup, VRAttributes.SupportTango));
 }