コード例 #1
0
        static void Drawer_TitleDefaultFrameSettings(HDRenderPipelineUI s, SerializedHDRenderPipelineAsset d, Editor o)
        {
            GUILayout.BeginHorizontal();
            EditorGUILayout.LabelField(defaultFrameSettingsContent, EditorStyles.boldLabel);
            EditorGUI.BeginChangeCheck();
            selectedFrameSettings = (SelectedFrameSettings)EditorGUILayout.EnumPopup(selectedFrameSettings);
            if (EditorGUI.EndChangeCheck())
            {
                s.isSectionExpandedCamera.value = false;
                s.isSectionExpandedBakedOrCustomReflection.value = false;
                s.isSectionExpandedRealtimeReflection.value      = false;
                switch (selectedFrameSettings)
                {
                case SelectedFrameSettings.Camera:
                    s.isSectionExpandedCamera.value = true;
                    break;

                case SelectedFrameSettings.BakedOrCustomReflection:
                    s.isSectionExpandedBakedOrCustomReflection.value = true;
                    break;

                case SelectedFrameSettings.RealtimeReflection:
                    s.isSectionExpandedRealtimeReflection.value = true;
                    break;
                }
            }
            GUILayout.EndHorizontal();
        }
コード例 #2
0
 static void Drawer_TitleDefaultFrameSettings(SerializedHDRenderPipelineAsset serialized, Editor owner)
 {
     GUILayout.BeginHorizontal();
     EditorGUILayout.LabelField(k_DefaultFrameSettingsContent, EditorStyles.boldLabel);
     EditorGUI.BeginChangeCheck();
     selectedFrameSettings = (SelectedFrameSettings)EditorGUILayout.EnumPopup(selectedFrameSettings);
     if (EditorGUI.EndChangeCheck())
     {
         ApplyChangedDisplayedFrameSettings(serialized, owner);
     }
     GUILayout.EndHorizontal();
 }
コード例 #3
0
 static void Drawer_TitleDefaultFrameSettings(HDRenderPipelineUI s, SerializedHDRenderPipelineAsset d, Editor o)
 {
     GUILayout.BeginHorizontal();
     EditorGUILayout.LabelField(defaultFrameSettingsContent, EditorStyles.boldLabel);
     EditorGUI.BeginChangeCheck();
     selectedFrameSettings = (SelectedFrameSettings)EditorGUILayout.EnumPopup(selectedFrameSettings);
     if (EditorGUI.EndChangeCheck())
     {
         Init(s, d, o);
     }
     GUILayout.EndHorizontal();
 }
コード例 #4
0
        static HDRenderPipelineUI()
        {
            Inspector = CED.Group(
                CED.Group(SupportedSettingsInfoSection),
                FrameSettingsSection,
                CED.FoldoutGroup(k_GeneralSectionTitle, Expandable.General, k_ExpandedState, Drawer_SectionGeneral),
                CED.FoldoutGroup(k_RenderingSectionTitle, Expandable.Rendering, k_ExpandedState,
                                 CED.Group(GroupOption.Indent, Drawer_SectionRenderingUnsorted),
                                 CED.FoldoutGroup(k_DecalsSubTitle, Expandable.Decal, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout, Drawer_SectionDecalSettings),
                                 CED.FoldoutGroup(k_DynamicResolutionSubTitle, Expandable.DynamicResolution, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout | FoldoutOption.NoSpaceAtEnd, Drawer_SectionDynamicResolutionSettings),
                                 CED.FoldoutGroup(k_LowResTransparencySubTitle, Expandable.LowResTransparency, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout | FoldoutOption.NoSpaceAtEnd, Drawer_SectionLowResTransparentSettings)
                                 ),
                CED.FoldoutGroup(k_LightingSectionTitle, Expandable.Lighting, k_ExpandedState,
                                 CED.Group(GroupOption.Indent, Drawer_SectionLightingUnsorted),
                                 CED.FoldoutGroup(k_CookiesSubTitle, Expandable.Cookie, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout, Drawer_SectionCookies),
                                 CED.FoldoutGroup(k_ReflectionsSubTitle, Expandable.Reflection, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout, Drawer_SectionReflection),
                                 CED.FoldoutGroup(k_SkySubTitle, Expandable.Sky, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout, Drawer_SectionSky),
                                 CED.FoldoutGroup(k_ShadowSubTitle, Expandable.Shadow, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout, Drawer_SectionShadows),
                                 CED.FoldoutGroup(k_LightLoopSubTitle, Expandable.LightLoop, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout | FoldoutOption.NoSpaceAtEnd, Drawer_SectionLightLoop)
                                 ),
                CED.FoldoutGroup(k_MaterialSectionTitle, Expandable.Material, k_ExpandedState, Drawer_SectionMaterialUnsorted),
                CED.FoldoutGroup(k_PostProcessSectionTitle, Expandable.PostProcess, k_ExpandedState, Drawer_SectionPostProcessSettings)
                );

            // fix init of selection along what is serialized
            if (k_ExpandedState[Expandable.BakedOrCustomProbeFrameSettings])
            {
                selectedFrameSettings = SelectedFrameSettings.BakedOrCustomReflection;
            }
            else if (k_ExpandedState[Expandable.RealtimeProbeFrameSettings])
            {
                selectedFrameSettings = SelectedFrameSettings.RealtimeReflection;
            }
            else //default value: camera
            {
                selectedFrameSettings = SelectedFrameSettings.Camera;
            }
        }