INNER CODE UNIT · Python

pie_worlds

kevinpbuckley/VibeUE · Content/Python/vibeue.py:295

def pie_worlds():
    """The live Play-In-Editor worlds, keyed by net role.

    Returns {"server": UWorld|None, "clients": [UWorld, ...], "all": [UWorld, ...],
    "local": UWorld|None}. The real PIE worlds have get_path_name() paths starting '/Game/' with
    'UEDPIE_<N>_' in them: N=0 is the server (dedicated) or the listen host, N>=1 are clients,
    ordered by N. Matching PIE worlds by name grabs one of the ~100 stale /Memory/UEDPIE_* shells
    (0 actors) that linger in a session, so this filters on the /Game/ path instead. "local" is the
    editor's own game world from UnrealEditorSubsystem.get_game_world().
    """
    marker = "UEDPIE_"
    indexed = []
    for world in unreal.ObjectIterator(unreal.World):
        try:
            path = world.get_path_name()
        except Exception:
            continue
        if not path.startswith("/Game/") or marker not in path:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…