MWS_2021/Unity Project/Assets/Scripts/Editor/LeafGrowScriptEditor.cs

19 lines
426 B
C#
Raw Normal View History

2021-04-17 22:09:48 +02:00
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
[CustomEditor(typeof(LeafGrowScript))]
public class LeafGrowScriptEditor : Editor
{
public override void OnInspectorGUI()
{
DrawDefaultInspector();
LeafGrowScript myScript = (LeafGrowScript)target;
if(GUILayout.Button("Grow Flower"))
{
myScript.DrawLeaf();
}
}
}