FogVoidEditor.cs 650 B

1234567891011121314151617181920212223242526272829
  1. using UnityEngine;
  2. using UnityEditor;
  3. namespace VolumetricFogAndMist2 {
  4. [CustomEditor(typeof(FogVoid))]
  5. public class FogVoidEditor : Editor {
  6. SerializedProperty falloff, roundness;
  7. private void OnEnable() {
  8. falloff = serializedObject.FindProperty("falloff");
  9. roundness = serializedObject.FindProperty("roundness");
  10. }
  11. public override void OnInspectorGUI() {
  12. serializedObject.Update();
  13. EditorGUILayout.PropertyField(roundness);
  14. EditorGUILayout.PropertyField(falloff);
  15. serializedObject.ApplyModifiedProperties();
  16. }
  17. }
  18. }