INNER CODE UNIT · Python

role

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

def role(actor):
    """The net role of an actor as a string (e.g. 'NetRole.ROLE_AUTHORITY').

    A 2-client PIE run is Standalone by default: BOTH worlds' actors read ROLE_AUTHORITY. Check
    this before claiming a networked (server/client) result. Returns "" if the actor has no
    readable role property.
    """
    try:
        return str(actor.get_editor_property("role"))
    except Exception:
        return ""


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

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…