/// <summary> /// Called on object exiting trigger. /// </summary> /// <param name="other"></param> void OnTriggerExit(Collider other) { ObjectSyncComponent syncComponent = other.GetComponent <ObjectSyncComponent>(); if (syncComponent != null) { Task t = new Task(syncComponent.SendExitSync); t.Start(); } }
/// <summary> /// Called on object exiting trigger. /// </summary> /// <param name="other"></param> void OnTriggerExit(Collider other) { ObjectSyncComponent syncComponent = other.GetComponent <ObjectSyncComponent>(); syncComponent?.SendExitSync(); }