| 76 | } |
| 77 | |
| 78 | void UMjInputHandler::EndPlay(const EEndPlayReason::Type EndPlayReason) |
| 79 | { |
| 80 | if (MouseDeltaProcessor.IsValid() && FSlateApplication::IsInitialized()) |
| 81 | { |
| 82 | FSlateApplication::Get().UnregisterInputPreProcessor(MouseDeltaProcessor); |
| 83 | } |
| 84 | MouseDeltaProcessor.Reset(); |
| 85 | |
| 86 | if (UWorld* World = GetWorld()) |
| 87 | { |
| 88 | if (APlayerController* PC = World->GetFirstPlayerController()) |
| 89 | { |
| 90 | UnlockCamera(PC); |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | Super::EndPlay(EndPlayReason); |
| 95 | } |
| 96 | |
| 97 | void UMjInputHandler::LockCamera(APlayerController* PC) |
| 98 | { |