コード例 #1
0
            internal void OnTierGUI(BuildTargetGroup platform, GraphicsTier tier, bool vertical)
            {
                TierSettings ts = EditorGraphicsSettings.GetTierSettings(platform, tier);

                EditorGUI.BeginChangeCheck();


                if (!vertical)
                {
                    EditorGUILayout.LabelField(Styles.empty, EditorStyles.boldLabel);
                }

                bool usingSRP = GraphicsSettings.renderPipelineAsset != null;

                if (!usingSRP)
                {
                    ts.standardShaderQuality        = ShaderQualityPopup(ts.standardShaderQuality);
                    ts.reflectionProbeBoxProjection = EditorGUILayout.Toggle(ts.reflectionProbeBoxProjection);
                    ts.reflectionProbeBlending      = EditorGUILayout.Toggle(ts.reflectionProbeBlending);
                    ts.detailNormalMap        = EditorGUILayout.Toggle(ts.detailNormalMap);
                    ts.semitransparentShadows = EditorGUILayout.Toggle(ts.semitransparentShadows);
                }

                if (SupportedRenderingFeatures.active.rendererSupportsLightProbeProxyVolumes)
                {
                    ts.enableLPPV = EditorGUILayout.Toggle(ts.enableLPPV);
                }

                if (!vertical)
                {
                    EditorGUILayout.LabelField(Styles.empty, EditorStyles.boldLabel);
                    EditorGUILayout.LabelField(Styles.empty, EditorStyles.boldLabel);
                }

                if (!usingSRP)
                {
                    ts.cascadedShadowMaps    = EditorGUILayout.Toggle(ts.cascadedShadowMaps);
                    ts.prefer32BitShadowMaps = EditorGUILayout.Toggle(ts.prefer32BitShadowMaps);
                    ts.hdr = EditorGUILayout.Toggle(ts.hdr);
                }

                ts.hdrMode = HDRModePopup(ts.hdrMode);

                if (!usingSRP)
                {
                    ts.renderingPath = RenderingPathPopup(ts.renderingPath);
                }

                if (SupportedRenderingFeatures.IsLightmapBakeTypeSupported(LightmapBakeType.Realtime))
                {
                    ts.realtimeGICPUUsage = RealtimeGICPUUsagePopup(ts.realtimeGICPUUsage);
                }

                if (EditorGUI.EndChangeCheck())
                {
                    // TODO: it should be doable in c# now as we "expose" GraphicsSettings anyway
                    EditorGraphicsSettings.RegisterUndo();
                    EditorGraphicsSettings.SetTierSettings(platform, tier, ts);
                }
            }
 private extern static void INTERNAL_CALL_GetCurrentTierSettingsImpl(out TierGraphicsSettingsEditorScript value);
 private extern static void INTERNAL_CALL_SetTierSettingsImpl(BuildTargetGroup target, GraphicsTier tier, ref TierGraphicsSettingsEditorScript settings);
 private extern static void INTERNAL_CALL_GetTierSettingsImpl(BuildTargetGroup target, GraphicsTier tier, out TierGraphicsSettingsEditorScript value);
 internal static void SetTierSettingsImpl(BuildTargetGroup target, GraphicsTier tier, TierGraphicsSettingsEditorScript settings)
 {
     INTERNAL_CALL_SetTierSettingsImpl(target, tier, ref settings);
 }