void OnSetAimingController(AimingController controller) { // Exit the current aiming controller. if (aimingController) { aimingController.Exit(ref controlReferences); } // Set new aiming controller and initialize it. aimingController = controller; aimingController.Initialize(ref controlReferences); }