Download LyraStarterGame/Source/LyraGame/Camera/LyraUICameraManagerComponent.cpp from Alexhas2/unitysamples: direct link, hf CLI and curl.
- Browser
- Download file 1.73 kB
-
https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Source/LyraGame/Camera/LyraUICameraManagerComponent.cpp
- Command line
-
hf download hf://datasets/Alexhas2/unitysamples/LyraStarterGame/Source/LyraGame/Camera/LyraUICameraManagerComponent.cpp
-
curl -L -o LyraUICameraManagerComponent.cpp https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Source/LyraGame/Camera/LyraUICameraManagerComponent.cpp
1.73 kB
| // Copyright Epic Games, Inc. All Rights Reserved. | |
| class AActor; | |
| class FDebugDisplayInfo; | |
| ULyraUICameraManagerComponent* ULyraUICameraManagerComponent::GetComponent(APlayerController* PC) | |
| { | |
| if (PC != nullptr) | |
| { | |
| if (ALyraPlayerCameraManager* PCCamera = Cast<ALyraPlayerCameraManager>(PC->PlayerCameraManager)) | |
| { | |
| return PCCamera->GetUICameraComponent(); | |
| } | |
| } | |
| return nullptr; | |
| } | |
| ULyraUICameraManagerComponent::ULyraUICameraManagerComponent() | |
| { | |
| bWantsInitializeComponent = true; | |
| if (!HasAnyFlags(RF_ClassDefaultObject)) | |
| { | |
| // Register "showdebug" hook. | |
| if (!IsRunningDedicatedServer()) | |
| { | |
| AHUD::OnShowDebugInfo.AddUObject(this, &ThisClass::OnShowDebugInfo); | |
| } | |
| } | |
| } | |
| void ULyraUICameraManagerComponent::InitializeComponent() | |
| { | |
| Super::InitializeComponent(); | |
| } | |
| void ULyraUICameraManagerComponent::SetViewTarget(AActor* InViewTarget, FViewTargetTransitionParams TransitionParams) | |
| { | |
| TGuardValue<bool> UpdatingViewTargetGuard(bUpdatingViewTarget, true); | |
| ViewTarget = InViewTarget; | |
| CastChecked<ALyraPlayerCameraManager>(GetOwner())->SetViewTarget(ViewTarget, TransitionParams); | |
| } | |
| bool ULyraUICameraManagerComponent::NeedsToUpdateViewTarget() const | |
| { | |
| return false; | |
| } | |
| void ULyraUICameraManagerComponent::UpdateViewTarget(struct FTViewTarget& OutVT, float DeltaTime) | |
| { | |
| } | |
| void ULyraUICameraManagerComponent::OnShowDebugInfo(AHUD* HUD, UCanvas* Canvas, const FDebugDisplayInfo& DisplayInfo, float& YL, float& YPos) | |
| { | |
| } | |