Download LyraStarterGame/Source/LyraGame/GameModes/LyraWorldSettings.cpp from Alexhas2/unitysamples: direct link, hf CLI and curl.
- Browser
- Download file 1.83 kB
-
https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Source/LyraGame/GameModes/LyraWorldSettings.cpp
- Command line
-
hf download hf://datasets/Alexhas2/unitysamples/LyraStarterGame/Source/LyraGame/GameModes/LyraWorldSettings.cpp
-
curl -L -o LyraWorldSettings.cpp https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Source/LyraGame/GameModes/LyraWorldSettings.cpp
1.83 kB
| // Copyright Epic Games, Inc. All Rights Reserved. | |
| ALyraWorldSettings::ALyraWorldSettings(const FObjectInitializer& ObjectInitializer) | |
| : Super(ObjectInitializer) | |
| { | |
| } | |
| FPrimaryAssetId ALyraWorldSettings::GetDefaultGameplayExperience() const | |
| { | |
| FPrimaryAssetId Result; | |
| if (!DefaultGameplayExperience.IsNull()) | |
| { | |
| Result = UAssetManager::Get().GetPrimaryAssetIdForPath(DefaultGameplayExperience.ToSoftObjectPath()); | |
| if (!Result.IsValid()) | |
| { | |
| UE_LOG(LogLyraExperience, Error, TEXT("%s.DefaultGameplayExperience is %s but that failed to resolve into an asset ID (you might need to add a path to the Asset Rules in your game feature plugin or project settings"), | |
| *GetPathNameSafe(this), *DefaultGameplayExperience.ToString()); | |
| } | |
| } | |
| return Result; | |
| } | |
| void ALyraWorldSettings::CheckForErrors() | |
| { | |
| Super::CheckForErrors(); | |
| FMessageLog MapCheck("MapCheck"); | |
| for (TActorIterator<APlayerStart> PlayerStartIt(GetWorld()); PlayerStartIt; ++PlayerStartIt) | |
| { | |
| APlayerStart* PlayerStart = *PlayerStartIt; | |
| if (IsValid(PlayerStart) && PlayerStart->GetClass() == APlayerStart::StaticClass()) | |
| { | |
| MapCheck.Warning() | |
| ->AddToken(FUObjectToken::Create(PlayerStart)) | |
| ->AddToken(FTextToken::Create(FText::FromString("is a normal APlayerStart, replace with ALyraPlayerStart."))); | |
| } | |
| } | |
| //@TODO: Make sure the soft object path is something that can actually be turned into a primary asset ID (e.g., is not pointing to an experience in an unscanned directory) | |
| } | |