예제 #1
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();

        NutSpawner myScript = (NutSpawner)target;

        if (GUILayout.Button("Build Object"))
        {
            myScript.BuildObject();
        }

        //if (GUILayout.Button("Destroy All Objects Spawned"))
        //{
        //    myScript.ClearObjectsSpawned();
        //}
    }
예제 #2
0
 private void Start()
 {
     thisNut    = gameObject;
     nutSpawner = FindObjectOfType <NutSpawner>();
 }
 void OnEnable()
 {
     nutsSpawner = (NutSpawner)target;
 }