private void DeselectObject(GameObject gameObject) { //undo stuff to gameObject agent.SetHighlight(false); Selection = null; agent = null; }
private void SelectObject(GameObject gameObject) { //do stuff to gameObject Selection = gameObject; agent = gameObject.GetComponent <ControllableAgent>(); agent.SetHighlight(true); }