fix the you are not the main thread and the editor is currently in a play mode errors
This commit is contained in:
@@ -128,7 +128,13 @@ UWorld* USGGloveTracker::FImpl::GetWorld()
|
||||
}
|
||||
}
|
||||
|
||||
if (!IsValid(World))
|
||||
/// NOTE
|
||||
/// IsInGameThread() check is to avoid EngineScriptHelpers::CheckIfInEditorAndPIE emitting:
|
||||
/// "You are not on the main thread."
|
||||
/// !(GEditor->PlayWorld || GIsPlayInEditorWorld) check is to avoid
|
||||
/// EngineScriptHelpers::CheckIfInEditorAndPIE emitting:
|
||||
/// The Editor is currently in a play mode.
|
||||
if (!IsValid(World) && IsInGameThread() && !(GEditor->PlayWorld || GIsPlayInEditorWorld))
|
||||
{
|
||||
UUnrealEditorSubsystem* UnrealEditorSubsystem{GEditor->GetEditorSubsystem<UUnrealEditorSubsystem>()};
|
||||
if (IsValid(UnrealEditorSubsystem))
|
||||
|
||||
Reference in New Issue
Block a user