public override void OnInspectorGUI() { DrawDefaultInspector(); cAmStar myScript = (cAmStar)target; if (GUILayout.Button("Random start/target")) { myScript.RandomlyPositionStartAndTarget(); } if (GUILayout.Button("Find path")) { myScript.ClearMap(); myScript.FindPath(); } }
// Start is called before the first frame update void Start() { // TODO: HACK probably should be a singleton or something map = FindObjectOfType <Map>(); AStar = FindObjectOfType <cAmStar>(); }