public void OnProvinceEnter(Agent agent) { //remove old location agent.location.Clear(); agent.transform.parent = null;//detach from parent //add new location agent.location.SetLocation(province.country, province, null); //parent agent.transform.parent = province.agents.gameObject.transform; //position agent.aboveOf(province.gameObject); //Debug.Log(string.Format("Agent {0} entered province {1}", agent.GetComponent<AgentDescriptor>().agentName, province.descriptor.provinceName)); }