private void DrawPostProcessInspector() { #if UNITY_POST_PROCESSING_STACK_V2 GUILayout.BeginVertical("box"); EditorGUILayout.LabelField("Add profiles", LabelStyle); EditorGUI.BeginChangeCheck(); PostProcessProfile newPostProcessProfile = (PostProcessProfile)EditorGUILayout.ObjectField("", null, typeof(PostProcessProfile), false); if (EditorGUI.EndChangeCheck()) { _vegetationStudioManager.AddPostProcessProfile(newPostProcessProfile); SetSceneDirty(); } EditorGUILayout.HelpBox("Add post processing profiles here to set up PostProcessVolumes for the biomes", MessageType.Info); GUILayout.EndVertical(); GUILayout.BeginVertical("box"); EditorGUI.BeginChangeCheck(); _vegetationStudioManager.PostProcessingLayer = EditorGUILayout.LayerField("Post process layer", _vegetationStudioManager.PostProcessingLayer); if (EditorGUI.EndChangeCheck()) { _vegetationStudioManager.RefreshPostProcessVolumes(); SetSceneDirty(); GUILayout.EndVertical(); return; } GUILayout.EndVertical(); for (int i = 0; i <= _vegetationStudioManager.PostProcessProfileInfoList.Count - 1; i++) { GUILayout.BeginVertical("box"); if (GUILayout.Button("Remove profile", GUILayout.Width(120))) { _vegetationStudioManager.RemovePostProcessProfile(i); SetSceneDirty(); GUILayout.EndVertical(); return; } EditorGUI.BeginChangeCheck(); PostProcessProfileInfo postProcessProfileInfo = _vegetationStudioManager.PostProcessProfileInfoList[i]; postProcessProfileInfo.Enabled = EditorGUILayout.Toggle("Enabled", postProcessProfileInfo.Enabled); postProcessProfileInfo.BiomeType = (BiomeType)EditorGUILayout.EnumPopup("Biome Type", postProcessProfileInfo.BiomeType); postProcessProfileInfo.VolumeHeight = EditorGUILayout.FloatField("Volume height", postProcessProfileInfo.VolumeHeight); postProcessProfileInfo.Priority = EditorGUILayout.FloatField("Priority", postProcessProfileInfo.Priority); postProcessProfileInfo.BlendDistance = EditorGUILayout.Slider("Blend distance", postProcessProfileInfo.BlendDistance, -0.1f, 4f); postProcessProfileInfo.Weight = EditorGUILayout.Slider("Weight", postProcessProfileInfo.Weight, 0f, 1f); postProcessProfileInfo.PostProcessProfile = (PostProcessProfile)EditorGUILayout.ObjectField("Profile", postProcessProfileInfo.PostProcessProfile, typeof(PostProcessProfile), false); if (EditorGUI.EndChangeCheck()) { _vegetationStudioManager.RefreshPostProcessVolumes(); SetSceneDirty(); GUILayout.EndVertical(); return; } GUILayout.EndVertical(); } #else EditorGUILayout.HelpBox("Install the Unity Post processing stack to enable.", MessageType.Info); #endif }