Download LyraStarterGame/Source/LyraEditor/LyraEditorEngine.cpp from Alexhas2/unitysamples: direct link, hf CLI and curl.
- Browser
- Download file 2.6 kB
-
https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Source/LyraEditor/LyraEditorEngine.cpp
- Command line
-
hf download hf://datasets/Alexhas2/unitysamples/LyraStarterGame/Source/LyraEditor/LyraEditorEngine.cpp
-
curl -L -o LyraEditorEngine.cpp https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Source/LyraEditor/LyraEditorEngine.cpp
2.6 kB
| // Copyright Epic Games, Inc. All Rights Reserved. | |
| class IEngineLoop; | |
| ULyraEditorEngine::ULyraEditorEngine(const FObjectInitializer& ObjectInitializer) | |
| : Super(ObjectInitializer) | |
| { | |
| } | |
| void ULyraEditorEngine::Init(IEngineLoop* InEngineLoop) | |
| { | |
| Super::Init(InEngineLoop); | |
| } | |
| void ULyraEditorEngine::Start() | |
| { | |
| Super::Start(); | |
| } | |
| void ULyraEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) | |
| { | |
| Super::Tick(DeltaSeconds, bIdleMode); | |
| FirstTickSetup(); | |
| } | |
| void ULyraEditorEngine::FirstTickSetup() | |
| { | |
| if (bFirstTickSetup) | |
| { | |
| return; | |
| } | |
| bFirstTickSetup = true; | |
| // Force show plugin content on load. | |
| GetMutableDefault<UContentBrowserSettings>()->SetDisplayPluginFolders(true); | |
| } | |
| FGameInstancePIEResult ULyraEditorEngine::PreCreatePIEInstances(const bool bAnyBlueprintErrors, const bool bStartInSpectatorMode, const float PIEStartTime, const bool bSupportsOnlinePIE, int32& InNumOnlinePIEInstances) | |
| { | |
| if (const ALyraWorldSettings* LyraWorldSettings = Cast<ALyraWorldSettings>(EditorWorld->GetWorldSettings())) | |
| { | |
| if (LyraWorldSettings->ForceStandaloneNetMode) | |
| { | |
| EPlayNetMode OutPlayNetMode; | |
| PlaySessionRequest->EditorPlaySettings->GetPlayNetMode(OutPlayNetMode); | |
| if (OutPlayNetMode != PIE_Standalone) | |
| { | |
| PlaySessionRequest->EditorPlaySettings->SetPlayNetMode(PIE_Standalone); | |
| FNotificationInfo Info(LOCTEXT("ForcingStandaloneForFrontend", "Forcing NetMode: Standalone for the Frontend")); | |
| Info.ExpireDuration = 2.0f; | |
| FSlateNotificationManager::Get().AddNotification(Info); | |
| } | |
| } | |
| } | |
| //@TODO: Should add delegates that a *non-editor* module could bind to for PIE start/stop instead of poking directly | |
| GetDefault<ULyraDeveloperSettings>()->OnPlayInEditorStarted(); | |
| GetDefault<ULyraPlatformEmulationSettings>()->OnPlayInEditorStarted(); | |
| // | |
| FGameInstancePIEResult Result = Super::PreCreatePIEServerInstance(bAnyBlueprintErrors, bStartInSpectatorMode, PIEStartTime, bSupportsOnlinePIE, InNumOnlinePIEInstances); | |
| return Result; | |
| } | |