public override void OnInspectorGUI() { DrawDefaultInspector(); if (GUILayout.Button("Reset All Positions")) { Debug.Log("Resetting All Positions"); TestingEnvironment e = (TestingEnvironment)target; e.ResetAllPositions(); } }
private void Start() { rb = this.gameObject.GetComponent <Rigidbody>(); env = this.gameObject.GetComponentInParent <TestingEnvironment>(); }