Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. using UnityEditor;
  2. using UnityEditor.UIElements;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using UnityEngine;
  6.  
  7. [CustomEditor(typeof(interActive_Object))]
  8. [CanEditMultipleObjects]
  9. public class interActive_Editor : Editor
  10. {
  11. //SerializedProperty type;
  12.  
  13. interActive_Object obj;
  14.  
  15. SerializedProperty speed;
  16.  
  17. void OnEnable()
  18. {
  19. obj = (interActive_Object)target;
  20. //type = serializedObject.FindProperty("interActiveType");
  21.  
  22. }
  23.  
  24. public override void OnInspectorGUI()
  25. {
  26. serializedObject.Update();
  27.  
  28.  
  29. EditorGUILayout.EnumPopup(obj, "what here?" );
  30. //EditorGUILayout.PropertyField(type);
  31.  
  32. /*
  33. if (type.enumValueIndex == 0)
  34. {
  35. EditorGUILayout.PropertyField(speed, new GUIContent("Speed"));
  36. }
  37. */
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement