/// <summary> /// Displays the additional parameters for directional lights /// </summary> private void DisplayDirectionalLightAdditionalSettingsArea() { EditorGUILayout.BeginVertical(); EditorGUILayout.Separator(); GUILayout.Label(_directionalLightSettingsTitleContent, new GUIStyle(GuiStyles.LabelBoldCenteredBig) { fontSize = 15 }); EditorGUILayout.Separator(); GuiHelpers.DrawContextualHelpBox("The \"Enable Out-Of-Phase Color\" parameter allows you to use a color when the view angle is not towards the directional light (the decay is controlled by the scattering factor."); GuiHelpers.DrawToggleChecker(ref _enableOutOfPhaseColorProperty, "Enable Out-Of-Phase Color"); if (_enableOutOfPhaseColorProperty.boolValue) { //EditorGUI.BeginDisabledGroup(!_enableOutOfPhaseColorProperty.boolValue); EditorGUILayout.BeginVertical(); GuiHelpers.DrawContextualHelpBox("The color when the view direction is not towards the directional light."); EditorGUILayout.PropertyField(_outOfPhaseColorProperty); GuiHelpers.DrawFloatField(ref _outOfPhaseColorStrengthProperty, new GUIContent("Strength", "Multiplies the intensity of the color")); EditorGUILayout.EndVertical(); //EditorGUI.EndDisabledGroup(); } EditorGUILayout.Separator(); EditorGUILayout.EndVertical(); }
/// <summary> /// Displays the common parameters tab /// </summary> private void DisplayCommonSettingsArea() { EditorGUILayout.BeginVertical(GuiStyles.ButtonNoHover); EditorGUILayout.Separator(); GUILayout.Label(_commonSettingsTitleContent, new GUIStyle(GuiStyles.LabelBoldCenteredBig) { fontSize = 15 }); EditorGUILayout.Separator(); GuiHelpers.DrawFloatField(ref _strengthProperty, new GUIContent("Strength", "Multiplies the intensity of the light source in the system")); EditorGUILayout.Separator(); EditorGUILayout.Separator(); GuiHelpers.DrawContextualHelpBox("The \"Enable Shadows\" parameter allows you to compute the light's shadows (if enabled) in the system."); GuiHelpers.DrawToggleChecker(ref _useShadowsProperty, "Enable Shadows"); EditorGUILayout.Separator(); EditorGUILayout.Separator(); GuiHelpers.DrawContextualHelpBox("The \"Enable Cookie\" parameter allows you to compute the light's cookie (if enabled) in the system."); //EditorGUI.BeginDisabledGroup(!_component.CastsCookie); GuiHelpers.DrawToggleChecker(ref _useCookieProperty, "Enable Cookie"); //EditorGUI.EndDisabledGroup(); EditorGUILayout.Separator(); EditorGUILayout.Separator(); GuiHelpers.DrawContextualHelpBox("The \"Override Color\" parameter allows you to replace the light's color in the system."); GuiHelpers.DrawToggleChecker(ref _overrideColorProperty, "Override Color"); if (_overrideColorProperty.boolValue) { //EditorGUI.BeginDisabledGroup(!_overrideColorProperty.boolValue); EditorGUILayout.BeginVertical(); GuiHelpers.DrawContextualHelpBox("The \"Overriding Color\" is the color that will replace the light's color in the system."); EditorGUILayout.PropertyField(_overridingColorProperty); EditorGUILayout.EndVertical(); //EditorGUI.EndDisabledGroup(); } EditorGUILayout.Separator(); GuiHelpers.DrawContextualHelpBox("The \"Scattering Bias\" parameter allows to have more control of how the light will scatter in the environment."); EditorGUILayout.BeginHorizontal(); GUILayout.Label("Scattering Bias", GuiStyles.Label, GUILayout.MaxWidth(160)); GuiHelpers.DrawSlider(ref _scatteringBiasProperty, -1.0f, 1.0f); EditorGUILayout.EndHorizontal(); EditorGUILayout.Separator(); EditorGUILayout.EndVertical(); }
/// <summary> /// Draws a Vector3 field /// </summary> /// <param name="vector3Property">The related serialized property</param> /// <param name="label">The label to write</param> public static void DrawVector3Field(ref SerializedProperty vector3Property, string label) { SerializedProperty xTmpProperty = vector3Property.FindPropertyRelative("x"); SerializedProperty yTmpProperty = vector3Property.FindPropertyRelative("y"); SerializedProperty zTmpProperty = vector3Property.FindPropertyRelative("z"); EditorGUILayout.BeginHorizontal(); GUILayout.Label("X", GuiStyles.Label, GUILayout.Width(14)); GuiHelpers.DrawFloatField(ref xTmpProperty); GUILayout.Label("Y", GuiStyles.Label, GUILayout.Width(14)); GuiHelpers.DrawFloatField(ref yTmpProperty); GUILayout.Label("Z", GuiStyles.Label, GUILayout.Width(14)); GuiHelpers.DrawFloatField(ref zTmpProperty); EditorGUILayout.EndHorizontal(); }
/// <summary> /// Displays Noise Mask Area /// </summary> private void DisplayNoiseMaskArea() { EditorGUILayout.BeginVertical(GuiStyles.Background); GuiHelpers.DrawContextualHelpBox("The \"Noise Mask\" parameter allows you to assign a dynamic morphing noise mask to the volume.\nThis noise will be used for masking the data injected."); GuiHelpers.DrawToggleChecker(ref _noiseMaskBoolProperty, new GUIContent("Noise Mask", Aura.ResourcesCollection.noiseIconTexture), true, true); if (_noiseMaskBoolProperty.boolValue) { //EditorGUI.BeginDisabledGroup(!_noiseMaskBoolProperty.boolValue); EditorGUILayout.BeginVertical(GuiStyles.EmptyMiddleAligned); GuiHelpers.DrawFloatField(ref _noiseMaskSpeedProperty, new GUIContent("Speed", "Speed of the morph")); EditorGUILayout.Separator(); EditorGUILayout.Separator(); GuiHelpers.DrawTransformField(ref _noiseMaskTransformProperty); EditorGUILayout.EndVertical(); //EditorGUI.EndDisabledGroup(); } EditorGUILayout.EndVertical(); }
/// <summary> /// Displays the common parameters tab /// </summary> private void DisplayCommonSettingsArea() { EditorGUILayout.BeginVertical(GuiStyles.ButtonNoHover); EditorGUILayout.Separator(); GUILayout.Label(_commonSettingsTitleContent, new GUIStyle(GuiStyles.LabelBoldCenteredBig) { fontSize = 15 }); EditorGUILayout.Separator(); GuiHelpers.DrawFloatField(ref _strengthProperty, new GUIContent("Strength", "Multiplies the intensity of the light source in the system")); EditorGUILayout.Separator(); EditorGUILayout.Separator(); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(_useScatteringProperty); if ((BooleanChoice)_useScatteringProperty.enumValueIndex == BooleanChoice.Default || (BooleanChoice)_useScatteringProperty.enumValueIndex == BooleanChoice.True) { EditorGUILayout.Separator(); GuiHelpers.DrawToggleChecker(ref _overrideScatteringProperty, "Override Scattering"); if (_overrideScatteringProperty.boolValue) { EditorGUILayout.BeginVertical(); EditorGUILayout.PropertyField(_overridingScatteringProperty); EditorGUILayout.EndVertical(); } } EditorGUILayout.Separator(); EditorGUILayout.Separator(); EditorGUILayout.Separator(); GuiHelpers.DrawContextualHelpBox("The \"Enable Shadows\" parameter allows you to compute the light's shadows (if enabled) in the system."); GuiHelpers.DrawToggleChecker(ref _useShadowsProperty, "Enable Shadows"); EditorGUILayout.Separator(); EditorGUILayout.Separator(); GuiHelpers.DrawContextualHelpBox("The \"Enable Cookie\" parameter allows you to compute the light's cookie (if enabled) in the system."); //EditorGUI.BeginDisabledGroup(!_component.CastsCookie); GuiHelpers.DrawToggleChecker(ref _useCookieProperty, "Enable Cookie"); //EditorGUI.EndDisabledGroup(); EditorGUILayout.Separator(); EditorGUILayout.Separator(); EditorGUILayout.Separator(); GuiHelpers.DrawContextualHelpBox("The \"Override Color\" parameter allows you to replace the light's color in the system."); GuiHelpers.DrawToggleChecker(ref _overrideColorProperty, "Override Color"); if (_overrideColorProperty.boolValue) { //EditorGUI.BeginDisabledGroup(!_overrideColorProperty.boolValue); EditorGUILayout.BeginVertical(); GuiHelpers.DrawContextualHelpBox("The \"Overriding Color\" is the color that will replace the light's color in the system."); EditorGUILayout.PropertyField(_overridingColorProperty); EditorGUILayout.EndVertical(); //EditorGUI.EndDisabledGroup(); } if (LightHelpers.IsColorTemperatureAvailable) { EditorGUILayout.Separator(); EditorGUILayout.Separator(); EditorGUILayout.Separator(); GuiHelpers.DrawHelpBox("Unity currently gives no way to know if the color temperature mode is enabled on the light, therefore you need to manually enable it here under.", HelpBoxType.Warning); EditorGUILayout.Separator(); GuiHelpers.DrawToggleChecker(ref _useColorTemperatureTintProperty, "Use Color Temperature Tint"); } EditorGUILayout.Separator(); EditorGUILayout.EndVertical(); }