public override void OnInspectorGUI() { DrawDefaultInspector(); PorkChopPlot pcp = (PorkChopPlot)target; if (GUILayout.Button("Build Object")) { pcp.CreatePlot(); } }
// Use this for initialization void Start() { base.Start(); selector = GameObject.Find("selector"); if (selector == null) { Debug.Log("cann't find selector in plot"); } pcp = GetComponent <PorkChopPlot>(); if (pcp == null) { Debug.Log("can't find porkchopplot component"); } }