static UniversalGlobalSettingsPanelIMGUI()
 {
     Inspector = CED.Group(
         LightLayerNamesSection,
         MiscSection
         );
 }
        internal static CED.IDrawer Inspector(bool withOverride = true) => CED.Group(
            CED.Group((serialized, owner) =>
        {
            lastBoxRect = EditorGUILayout.BeginVertical("box");

            // Add dedicated scope here and on each FrameSettings field to have the contextual menu on everything
            Rect rect = GUILayoutUtility.GetRect(1, EditorGUIUtility.singleLineHeight);
            using (new SerializedFrameSettings.TitleDrawingScope(rect, FrameSettingsUI.frameSettingsHeaderContent, serialized))
            {
                EditorGUI.LabelField(rect, FrameSettingsUI.frameSettingsHeaderContent, EditorStyles.boldLabel);
            }
        }),
            InspectorInnerbox(withOverride),
            CED.Group((serialized, owner) =>
        {
            EditorGUILayout.EndVertical();
            using (new SerializedFrameSettings.TitleDrawingScope(lastBoxRect, FrameSettingsUI.frameSettingsHeaderContent, serialized))
            {
                //Nothing to draw.
                //We just want to have a big blue bar at left that match the whole framesetting box.
                //This is because framesettings will be considered as one bg block from prefab point
                //of view as there is no way to separate it bit per bit in serialization and Prefab
                //override API rely on SerializedProperty.
            }
        })
            );
        static InfluenceVolumeUI()
        {
            SectionShape = CED.Group(
                CED.Action(Drawer_FieldShapeType),
                CED.FadeGroup(
                    (s, d, o, i) => s.IsSectionExpanded_Shape((ShapeType)i),
                    FadeOption.Indent,
                    SectionShapeBox,
                    SectionShapeSphere
                    )
                );

            SectionFoldoutShape = CED.Group(
                CED.FoldoutGroup(
                    "Influence Volume",
                    (s, d, o) => s.isSectionExpandedShape,
                    FoldoutOption.Indent,
                    CED.Action(Drawer_FieldShapeType),
                    CED.FadeGroup(
                        (s, d, o, i) => s.IsSectionExpanded_Shape((ShapeType)i),
                        FadeOption.None,
                        SectionShapeBox,
                        SectionShapeSphere
                        )
                    )
                );
        }
 static GlobalLightLoopSettingsUI()
 {
     Inspector = CED.Group(
         CED.FoldoutGroup(
             k_CookiesHeaderContent,
             Expandable.Cookie,
             k_ExpandedState,
             Drawer_SectionCookies
             ),
         CED.FoldoutGroup(
             k_ReflectionsHeaderContent,
             Expandable.Reflection,
             k_ExpandedState,
             Drawer_SectionReflection
             ),
         CED.FoldoutGroup(
             k_SkyHeaderContent,
             Expandable.Sky,
             k_ExpandedState,
             Drawer_SectionSky
             ),
         CED.FoldoutGroup(
             k_LightLoopHeaderContent,
             Expandable.LightLoop,
             k_ExpandedState,
             Drawer_LightLoop
             )
         );
 }
        static RenderPipelineSettingsUI()
        {
            Inspector = CED.Group(
                SectionPrimarySettings,
                CED.space,
                CED.Select(
                    (s, d, o) => s.lightLoopSettings,
                    (s, d, o) => d.lightLoopSettings,
                    GlobalLightLoopSettingsUI.Inspector
                    ),
                CED.space,
                CED.Select(
                    (s, d, o) => s.shadowInitParams,
                    (s, d, o) => d.shadowInitParams,
                    ShadowInitParametersUI.SectionAtlas
                    ),
                CED.space,
                CED.Select(
                    (s, d, o) => s.decalSettings,
                    (s, d, o) => d.decalSettings,
                    GlobalDecalSettingsUI.Inspector
                    )

                );
        }
 static GlobalLightLoopSettingsUI()
 {
     Inspector = CED.Group(
         CED.FoldoutGroup(
             "Cookies",
             (s, d, o) => s.isSectionExpandedCoockiesSettings,
             FoldoutOption.None,
             SectionCookies),
         CED.FoldoutGroup(
             "Reflections",
             (s, d, o) => s.isSectionExpandedReflectionSettings,
             FoldoutOption.None,
             SectionReflection),
         CED.FoldoutGroup(
             "Sky",
             (s, d, o) => s.isSectionExpendedSkySettings,
             FoldoutOption.None,
             SectionSky),
         CED.FoldoutGroup(
             "LightLoop",
             (s, d, o) => s.isSectionExpendedLightLoopSettings,
             FoldoutOption.None,
             SectionLightLoop)
         );
 }
Exemplo n.º 7
0
 //separated to add enum popup on default frame settings
 internal static CED.IDrawer InspectorInnerbox(bool withOverride = true, bool isBoxed = true) => CED.Group(
     CED.FoldoutGroup(renderingSettingsHeaderContent, Expandable.RenderingPasses, k_ExpandedState, isBoxed ? FoldoutOption.Indent | FoldoutOption.Boxed : FoldoutOption.Indent,
                      CED.Group(206, (serialized, owner) => Drawer_SectionRenderingSettings(serialized, owner, withOverride))
                      ),
     CED.FoldoutGroup(lightSettingsHeaderContent, Expandable.LightingSettings, k_ExpandedState, isBoxed ? FoldoutOption.Indent | FoldoutOption.Boxed : FoldoutOption.Indent,
                      CED.Group(206, (serialized, owner) => Drawer_SectionLightingSettings(serialized, owner, withOverride))
                      ),
     CED.FoldoutGroup(asyncComputeSettingsHeaderContent, Expandable.AsynComputeSettings, k_ExpandedState, isBoxed ? FoldoutOption.Indent | FoldoutOption.Boxed : FoldoutOption.Indent,
                      CED.Group(206, (serialized, owner) => Drawer_SectionAsyncComputeSettings(serialized, owner, withOverride))
                      ),
     CED.FoldoutGroup(lightLoopSettingsHeaderContent, Expandable.LightLoop, k_ExpandedState, isBoxed ? FoldoutOption.Indent | FoldoutOption.Boxed : FoldoutOption.Indent,
                      CED.Group(206, (serialized, owner) => Drawer_SectionLightLoopSettings(serialized, owner, withOverride))
                      ),
     CED.Group((serialized, owner) =>
 {
     var hdrpAsset = GetHDRPAssetFor(owner);
     if (hdrpAsset != null)
     {
         RenderPipelineSettings hdrpSettings = hdrpAsset.currentPlatformRenderPipelineSettings;
         if (hdrpSettings.supportRayTracing)
         {
             bool rtEffectUseAsync = (serialized.IsEnabled(FrameSettingsField.SSRAsync) ?? false) || (serialized.IsEnabled(FrameSettingsField.SSAOAsync) ?? false)
                                     //|| (serialized.IsEnabled(FrameSettingsField.ContactShadowsAsync) ?? false) // Contact shadow async is not visible in the UI for now and defaults to true.
             ;
             if (rtEffectUseAsync)
             {
                 EditorGUILayout.HelpBox("Asynchronous execution of Raytracing effects is not supported. Asynchronous Execution will be forced to false for them", MessageType.Warning);
             }
         }
     }
 }));
Exemplo n.º 8
0
 static InfluenceVolumeUI()
 {
     SectionFoldoutShapePlanar = CED.Group(
         CED.FoldoutGroup(
             influenceVolumeHeader,
             (s, d, o) => s.isSectionExpandedShape,
             FoldoutOption.Indent,
             CED.Action(Drawer_InfluenceAdvancedSwitch),
             CED.space,
             CED.Action(Drawer_FieldShapeType),
             CED.FadeGroup(
                 (s, d, o, i) => s.IsSectionExpanded_Shape((InfluenceShape)i),
                 FadeOption.None,
                 SectionShapeBoxPlanar,
                 SectionShapeSpherePlanar
                 )
             )
         );
     SectionFoldoutShape = CED.Group(
         CED.FoldoutGroup(
             influenceVolumeHeader,
             (s, d, o) => s.isSectionExpandedShape,
             FoldoutOption.Indent,
             CED.Action(Drawer_InfluenceAdvancedSwitch),
             CED.space,
             CED.Action(Drawer_FieldShapeType),
             CED.FadeGroup(
                 (s, d, o, i) => s.IsSectionExpanded_Shape((InfluenceShape)i),
                 FadeOption.None,
                 SectionShapeBox,
                 SectionShapeSphere
                 )
             )
         );
 }
        internal static CED.IDrawer InnerInspector(ReflectionProbeType type)
        {
            switch (type)
            {
            case ReflectionProbeType.PlanarReflection:
                return(CED.Group(
                           CED.Action(Drawer_InfluenceAdvancedSwitch),
                           CED.Action(Drawer_FieldShapeType),
                           CED.FadeGroup(
                               (s, d, o, i) => s.IsSectionExpanded_Shape((InfluenceShape)i),
                               FadeOption.None,
                               SectionShapeBoxPlanar,
                               SectionShapeSpherePlanar
                               )
                           ));

            case ReflectionProbeType.ReflectionProbe:
                return(CED.Group(
                           CED.Action(Drawer_InfluenceAdvancedSwitch),
                           CED.Action(Drawer_FieldShapeType),
                           CED.FadeGroup(
                               (s, d, o, i) => s.IsSectionExpanded_Shape((InfluenceShape)i),
                               FadeOption.None,
                               SectionShapeBox,
                               SectionShapeSphere
                               )
                           ));

            default:
                throw new System.ArgumentException("Unknown probe type");
            }
        }
        static PlanarReflectionProbeUI()
        {
            SectionFoldoutCaptureSettings = CED.FoldoutGroup(
                "Capture Settings",
                (s, d, o) => s.isSectionExpandedCaptureSettings,
                FoldoutOption.Indent,
                CED.Action(Drawer_SectionCaptureSettings),
                CED.FadeGroup(
                    (s, d, o, i) =>
            {
                switch (i)
                {
                default:
                case 0: return(s.isSectionExpandedCaptureMirrorSettings);

                case 1: return(s.isSectionExpandedCaptureStaticSettings);
                }
            },
                    FadeOption.None,
                    SectionCaptureMirrorSettings,
                    SectionCaptureStaticSettings)
                );

            SectionProbeModeSettings = CED.Group(
                CED.Action(Drawer_FieldCaptureType),
                CED.FadeGroup(
                    (s, d, o, i) => s.IsSectionExpandedReflectionProbeMode((ReflectionProbeMode)i),
                    FadeOption.Indent,
                    SectionProbeModeBakedSettings,
                    SectionProbeModeRealtimeSettings,
                    SectionProbeModeCustomSettings
                    )
                );

            Inspector = CED.Group(
                //SectionProbeModeSettings,
                CED.space,
                CED.Action((s, d, o) => EditorGUILayout.LabelField(_.GetContent("Proxy Volume"), EditorStyles.boldLabel)),
                CED.Action(Drawer_FieldProxyVolumeReference),
                CED.space,
                CED.Action(Drawer_Toolbar),
                CED.space,
                CED.Select(
                    (s, d, o) => s.influenceVolume,
                    (s, d, o) => d.influenceVolume,
                    InfluenceVolumeUI.SectionFoldoutShape
                    ),
                CED.Action(Drawer_DifferentShapeError),
                SectionFoldoutInfluenceSettings,
                SectionFoldoutCaptureSettings,
                CED.Select(
                    (s, d, o) => s.frameSettings,
                    (s, d, o) => d.frameSettings,
                    FrameSettingsUI.Inspector
                    ),
                CED.space,
                CED.Action(Drawer_SectionBakeButton)
                );
        }
 static ReflectionProxyVolumeComponentUI()
 {
     Inspector = CED.Select(
         (s, d, o) => s.proxyVolume,
         (s, d, o) => d.proxyVolume,
         ProxyVolumeUI.SectionShape
         );
 }
Exemplo n.º 12
0
 internal static CED.IDrawer Inspector(bool withOverride = true) => CED.Group(
     CED.Group((serialized, owner) =>
 {
     EditorGUILayout.BeginVertical("box");
     EditorGUILayout.LabelField(FrameSettingsUI.frameSettingsHeaderContent, EditorStyles.boldLabel);
 }),
     InspectorInnerbox(withOverride),
     CED.Group((serialized, owner) => EditorGUILayout.EndVertical())
     );
 public static CED.IDrawer SectionLightingSettings(bool withOverride)
 {
     return(CED.FoldoutGroup(
                lightSettingsHeaderContent,
                (s, p, o) => s.isSectionExpandedLightingSettings,
                FoldoutOption.Indent | FoldoutOption.Boxed,
                CED.LabelWidth(250, CED.Action((s, p, o) => Drawer_SectionLightingSettings(s, p, o, withOverride))),
                CED.space));
 }
Exemplo n.º 14
0
 static HDRaytracingEnvironmentInspector()
 {
     Inspector = CED.Group(CED.FoldoutGroup(Styles.genericSectionText, Expandable.Generic, k_ExpandedState, GenericSubMenu),
                           CED.FoldoutGroup(Styles.aoSectionText, Expandable.AmbientOcclusion, k_ExpandedState, AmbientOcclusionSubMenu),
                           CED.FoldoutGroup(Styles.reflSectionText, Expandable.Reflection, k_ExpandedState, ReflectionsSubMenu),
                           CED.FoldoutGroup(Styles.shadowSectionText, Expandable.AreaShadow, k_ExpandedState, AreaShadowSubMenu),
                           CED.FoldoutGroup(Styles.primaryRaytracingSectionText, Expandable.PrimaryRaytracing, k_ExpandedState, RaytracingSubMenu),
                           CED.FoldoutGroup(Styles.indirectDiffuseSectionText, Expandable.IndirectDiffuse, k_ExpandedState, IndirectDiffuseSubMenu));
 }
 static GlobalPostProcessSettingsUI()
 {
     Inspector = CED.FoldoutGroup(
         k_HeaderContent,
         Expandable.PostProcessSettings,
         k_ExpandedState,
         Drawer_SectionPostProcessSettings
         );
 }
Exemplo n.º 16
0
 static GlobalDecalSettingsUI()
 {
     Inspector = CED.FoldoutGroup(
         k_HeaderContent,
         Expandable.DecalSettings,
         k_ExpandedState,
         Drawer_SectionDecalSettings
         );
 }
 public static CED.IDrawer SectionRenderingPasses(bool withOverride)
 {
     return(CED.FoldoutGroup(
                renderingPassesHeaderContent,
                Expandable.RenderingPasses,
                k_ExpandedState,
                FoldoutOption.Indent | FoldoutOption.Boxed,
                CED.Group(200, CED.Group((serialized, owner) => Drawer_SectionRenderingPasses(serialized, owner, withOverride)))
                ));
 }
Exemplo n.º 18
0
 static CED.IDrawer AntialiasingModeDrawer(HDAdditionalCameraData.AntialiasingMode antialiasingMode, CED.ActionDrawer antialiasingDrawer)
 {
     return(CED.Conditional(
                (serialized, owner) => serialized.antialiasing.intValue == (int)antialiasingMode,
                CED.Group(
                    GroupOption.Indent,
                    antialiasingDrawer
                    )
                ));
 }
 static GlobalLightLoopSettingsUI()
 {
     Inspector = CED.Group(
         SectionCookies,
         CED.space,
         SectionReflection,
         CED.space,
         SectionSky
         );
 }
 public static CED.IDrawer SectionLightingSettings(bool withOverride)
 {
     return(CED.FoldoutGroup(
                lightSettingsHeaderContent,
                Expandable.LightingSettings,
                k_ExpandedState,
                FoldoutOption.Indent | FoldoutOption.Boxed,
                CED.Group(250, CED.Group((serialized, owner) => Drawer_SectionLightingSettings(serialized, owner, withOverride)))
                ));
 }
Exemplo n.º 21
0
 static CED.IDrawer AntialiasingModeDrawer(HDAdditionalCameraData.AntialiasingMode antialiasingMode, CED.ActionDrawer antialiasingDrawer)
 {
     return(CED.Conditional(
                (serialized, owner) => (serialized.antialiasing.intValue == (int)antialiasingMode) && (s_IsRunningTAAU ? serialized.antialiasing.intValue == (int)HDAdditionalCameraData.AntialiasingMode.TemporalAntialiasing : true),
                CED.Group(
                    GroupOption.Indent,
                    antialiasingDrawer
                    )
                ));
 }
 public static CED.IDrawer SectionRenderingPasses(bool withOverride)
 {
     return(CED.FoldoutGroup(
                renderingPassesHeaderContent,
                (s, p, o) => s.isSectionExpandedRenderingPasses,
                FoldoutOption.Indent | FoldoutOption.Boxed,
                CED.LabelWidth(200, CED.Action((s, p, o) => Drawer_SectionRenderingPasses(s, p, o, withOverride))),
                CED.space
                ));
 }
Exemplo n.º 23
0
#pragma warning disable 618 //CED
        public static CED.IDrawer SectionAsyncComputeSettings(bool withOverride)
#pragma warning restore 618
        {
            return(CED.FoldoutGroup(
                       asyncComputeSettingsHeaderContent,
                       (s, p, o) => s.isSectionExpandedAsyncComputeSettings,
                       FoldoutOption.Indent | FoldoutOption.Boxed,
                       CED.LabelWidth(250, CED.Action((s, p, o) => Drawer_SectionAsyncComputeSettings(s, p, o, withOverride))),
                       CED.space
                       ));
        }
 internal static CED.IDrawer Inspector(bool withOverride = true, bool withXR = true)
 {
     return(CED.Group(
                CED.Action((s, d, o) =>
     {
         EditorGUILayout.BeginVertical("box");
         EditorGUILayout.LabelField(FrameSettingsUI.frameSettingsHeaderContent, EditorStyles.boldLabel);
     }),
                InspectorInnerbox(withOverride, withXR),
                CED.Action((s, d, o) => EditorGUILayout.EndVertical())
                ));
 }
Exemplo n.º 25
0
 static HDProbeUI()
 {
     SectionProbeModeSettings = CED.Group(
         CED.Action(Drawer_FieldCaptureType),
         CED.FadeGroup(
             (s, d, o, i) => s.IsSectionExpandedReflectionProbeMode((ReflectionProbeMode)i),
             FadeOption.Indent,
             SectionProbeModeBakedSettings,
             SectionProbeModeRealtimeSettings
             )
         );
 }
Exemplo n.º 26
0
 static ProxyVolumeUI()
 {
     SectionShape = CED.Group(
         CED.Action(Drawer_FieldShapeType),
         CED.FadeGroup(
             (s, d, o, i) => s.IsSectionExpanded_Shape((ShapeType)i),
             true,
             SectionShapeBox,
             SectionShapeSphere
             )
         );
 }
 public static CED.IDrawer SectionXRSettings(bool withOverride)
 {
     return(CED.FadeGroup(
                (s, d, o, i) => s.isSectionExpandedXRSupported,
                FadeOption.None,
                CED.FoldoutGroup(
                    xrSettingsHeaderContent,
                    (s, p, o) => s.isSectionExpandedXRSettings,
                    FoldoutOption.Indent | FoldoutOption.Boxed,
                    CED.LabelWidth(200, CED.Action((s, p, o) => Drawer_FieldStereoEnabled(s, p, o, withOverride))),
                    CED.space)));
 }
Exemplo n.º 28
0
 static ProxyVolumeUI()
 {
     SectionShape = CED.Group(
         CED.Action(Drawer_FieldShapeType),
         CED.FadeGroup(
             (s, d, o, i) => s.IsSectionExpanded_Shape((InfluenceShape)i),
             FadeOption.Indent,
             SectionShapeBox,
             SectionShapeSphere
             )
         );
 }
 //separated to add enum popup on default frame settings
 internal static CED.IDrawer InspectorInnerbox(bool withOverride = true)
 {
     return(CED.Group(
                SectionRenderingPasses(withOverride),
                SectionRenderingSettings(withOverride),
                SectionLightingSettings(withOverride),
                SectionAsyncComputeSettings(withOverride),
                CED.Select(
                    (serialized, owner) => serialized.lightLoopSettings,
                    LightLoopSettingsUI.SectionLightLoopSettings(withOverride)
                    )
                ));
 }
 //separated to add enum popup on default frame settings
 internal static CED.IDrawer InspectorInnerbox(bool withOverride = true)
 {
     return(CED.Group(
                SectionRenderingPasses(withOverride),
                SectionRenderingSettings(withOverride),
                SectionLightingSettings(withOverride),
                CED.Select(
                    (s, d, o) => s.lightLoopSettings,
                    (s, d, o) => d.lightLoopSettings,
                    LightLoopSettingsUI.SectionLightLoopSettings(withOverride)
                    )
                ));
 }