Esempio n. 1
0
        public override void OnInspectorGUI()
        {
            PedestrianArea myTarget = (PedestrianArea)target;

            EditorGUI.BeginChangeCheck();

            EditorGUILayout.PropertyField(serializedObject.FindProperty("bDebug"), new GUIContent("Debug?"));
            EditorGUILayout.PropertyField(serializedObject.FindProperty("Size"), new GUIContent("Size"));
            EditorGUILayout.PropertyField(serializedObject.FindProperty("PatchResolution"), new GUIContent("PatchResolution"));

            bool changed = EditorGUI.EndChangeCheck();

            if (GUILayout.Button("Build!", GUILayout.Height(100)))
            {
                myTarget.BuildWalkableArea();
            }
            if (changed)
            {
                serializedObject.ApplyModifiedProperties();
            }
        }
Esempio n. 2
0
 public void Awake()
 {
     _instance = this;
 }