void OnDestroy() { // Unregister the controller update listener. controller.OnControllerUpdate -= OnControllerUpdate; // Reset the singleton instance. instance = null; }
void Start() { instance = this; UpdateHandedness(); // Reset other relevant state. firstUpdate = true; elbowOffset = Vector3.zero; alphaValue = 1.0f; zeroAccel.Set(0, GRAVITY_FORCE, 0); }
void OnDestroy() { // Reset the singleton instance. instance = null; }