Download LyraStarterGame/Source/LyraGame/UI/LyraGameViewportClient.cpp from Alexhas2/unitysamples: direct link, hf CLI and curl.
- Browser
- Download file 1.06 kB
-
https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Source/LyraGame/UI/LyraGameViewportClient.cpp
- Command line
-
hf download hf://datasets/Alexhas2/unitysamples/LyraStarterGame/Source/LyraGame/UI/LyraGameViewportClient.cpp
-
curl -L -o LyraGameViewportClient.cpp https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Source/LyraGame/UI/LyraGameViewportClient.cpp
1.06 kB
| // Copyright Epic Games, Inc. All Rights Reserved. | |
| class UGameInstance; | |
| namespace GameViewportTags | |
| { | |
| UE_DEFINE_GAMEPLAY_TAG_STATIC(TAG_Platform_Trait_Input_HardwareCursor, "Platform.Trait.Input.HardwareCursor"); | |
| } | |
| ULyraGameViewportClient::ULyraGameViewportClient() | |
| : Super(FObjectInitializer::Get()) | |
| { | |
| } | |
| void ULyraGameViewportClient::Init(struct FWorldContext& WorldContext, UGameInstance* OwningGameInstance, bool bCreateNewAudioDevice) | |
| { | |
| Super::Init(WorldContext, OwningGameInstance, bCreateNewAudioDevice); | |
| // We have software cursors set up in our project settings for console/mobile use, but on desktop we're fine with | |
| // the standard hardware cursors | |
| const bool UseHardwareCursor = ICommonUIModule::GetSettings().GetPlatformTraits().HasTag(GameViewportTags::TAG_Platform_Trait_Input_HardwareCursor); | |
| SetUseSoftwareCursorWidgets(!UseHardwareCursor); | |
| } | |