Modelowanie_Wirtualnych_Swi.../Assets/Scripts/Editor/LeafGrowEditor.cs

19 lines
400 B
C#
Raw Permalink Normal View History

2021-05-07 21:53:42 +02:00
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();
}
}
}