/// <summary> /// Detargets all pointers except the one with the specified ID. /// </summary> /// <param name="pointerID">The pointer to leave targetted.</param> public void DetargetAllExcept(int pointerID) { for (int j = 0; j < numActivePointers; ++j) { if (activePointers[j] != pointerID) { for (int i = 0; i < uiCameras.Length; ++i) if (uiCameras[i].camera != null && uiCameras[i].camera.gameObject.active) { if (pointers[i, activePointers[j]].targetObj != null) { // Gracefully release the current control: POINTER_INFO ptr = new POINTER_INFO(); ptr.Copy(pointers[i, pointerID]); ptr.isTap = false; ptr.evt = POINTER_INFO.INPUT_EVENT.RELEASE_OFF; pointers[i, pointerID].targetObj.OnInput(ptr); pointers[i, activePointers[j]].targetObj = null; } } } } }