Answers for "prompt for array unity c# editor scripting"

C#
0

prompt for array unity c# editor scripting

[CustomEditor(typeof(RoomItem))] public class RoomItemEditor : Editor {
   public override void OnInspectorGUI() {
     serializedObject.Update();
     var controller = target as RoomItem;
     EditorGUIUtility.LookLikeInspector();
     SerializedProperty tps = serializedObject.FindProperty ("targetPoints");
     EditorGUI.BeginChangeCheck();
     EditorGUILayout.PropertyField(tps, true);
     if(EditorGUI.EndChangeCheck())
       serializedObject.ApplyModifiedProperties();
     EditorGUIUtility.LookLikeControls();
     // ...
   }
 }
Posted by: Guest on February-08-2020

C# Answers by Framework

Browse Popular Code Answers by Language