mirror of
https://github.com/kevinporetti/UnrealImGui.git
synced 2025-01-18 16:30:32 +00:00
d4ffe9443f
- Removed explicit PCH. - Fixed includes to compile for all supported engine versions, including non-unity builds. - Configured build.cs to treat ImGui as an engine module and added stricter compilation rules.
23 lines
483 B
C++
23 lines
483 B
C++
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
|
|
|
#include "WorldContext.h"
|
|
|
|
|
|
namespace Utilities
|
|
{
|
|
const FWorldContext* GetWorldContextFromNetMode(ENetMode NetMode)
|
|
{
|
|
checkf(GEngine, TEXT("GEngine required to get list of worlds."));
|
|
|
|
for (const FWorldContext& WorldContext : GEngine->GetWorldContexts())
|
|
{
|
|
if (WorldContext.World() && WorldContext.World()->GetNetMode() == NetMode)
|
|
{
|
|
return &WorldContext;
|
|
}
|
|
}
|
|
|
|
return nullptr;
|
|
}
|
|
}
|