void Awake() { if (autoAssign) { handle = PlayerHandleManager.GetNewPlayerHandle(); handle.global = global; SetPlayerHandleMaps(handle, true, true); } }
public void Destroy() { for (int i = 0; i < maps.Count; i++) { maps[i].active = false; } for (int i = assignments.Count - 1; i >= 0; i--) { assignments[i].Unassign(); } currentInputHandler.children.Remove(this); PlayerHandleManager.RemovePlayerHandle(this); if (onChanged != null) { onChanged(); } }