19 lines
400 B
C#
19 lines
400 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
[CustomEditor(typeof(LeafGrow))]
|
|
public class LeafGrowEditor : Editor
|
|
{
|
|
public override void OnInspectorGUI()
|
|
{
|
|
DrawDefaultInspector();
|
|
LeafGrow myScript = (LeafGrow)target;
|
|
if(GUILayout.Button("Grow Leaf"))
|
|
{
|
|
myScript.DrawLeaf();
|
|
}
|
|
}
|
|
}
|