29 lines
861 B
C#
29 lines
861 B
C#
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
namespace Passer.CreatureControl {
|
|
|
|
[CustomEditor(typeof(Ant))]
|
|
public class Ant_Editor : Insect_Editor {
|
|
|
|
protected Ant ant;
|
|
|
|
public override void OnEnable() {
|
|
this.ant = target as Ant;
|
|
|
|
base.OnEnable();
|
|
}
|
|
|
|
public override void OnInspectorGUI() {
|
|
base.OnInspectorGUI();
|
|
|
|
HomePheromonePrefabInspector();
|
|
}
|
|
|
|
private void HomePheromonePrefabInspector() {
|
|
SerializedProperty homePheromonePrefabProp = serializedObject.FindProperty(nameof(Ant.homePheromonePrefab));
|
|
homePheromonePrefabProp.objectReferenceValue = (GameObject) EditorGUILayout.ObjectField("Home Pheromone Prefab", homePheromonePrefabProp.objectReferenceValue, typeof(GameObject), true);
|
|
}
|
|
}
|
|
|
|
} |