docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ClientServerWorldExtensions

    Netcode-specific extension methods for worlds.

    Inheritance
    object
    ClientServerWorldExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.NetCode
    Assembly: Unity.NetCode.dll
    Syntax
    public static class ClientServerWorldExtensions

    Methods

    IsClient(World)

    Check if a world is a client, will also return true for thin clients.

    Declaration
    public static bool IsClient(this World world)
    Parameters
    Type Name Description
    World world

    A Unity.Entities.World instance

    Returns
    Type Description
    bool

    Whether world is a client or a thin client world.

    IsClient(WorldUnmanaged)

    Check if an unmanaged world is a client, will also return true for thin clients.

    Declaration
    public static bool IsClient(this WorldUnmanaged world)
    Parameters
    Type Name Description
    WorldUnmanaged world

    A Unity.Entities.WorldUnmanaged instance

    Returns
    Type Description
    bool

    Whether world is a client or a thin client world.

    IsServer(World)

    Check if a world is a server.

    Declaration
    public static bool IsServer(this World world)
    Parameters
    Type Name Description
    World world

    A Unity.Entities.World instance

    Returns
    Type Description
    bool

    Whether world is a server world.

    IsServer(WorldUnmanaged)

    Check if an unmanaged world is a server.

    Declaration
    public static bool IsServer(this WorldUnmanaged world)
    Parameters
    Type Name Description
    WorldUnmanaged world

    A Unity.Entities.WorldUnmanaged instance

    Returns
    Type Description
    bool

    Whether world is a server world.

    IsThinClient(World)

    Check if a world is a thin client.

    Declaration
    public static bool IsThinClient(this World world)
    Parameters
    Type Name Description
    World world

    A Unity.Entities.World instance

    Returns
    Type Description
    bool

    Whether world is a thin client world.

    IsThinClient(WorldUnmanaged)

    Check if an unmanaged world is a thin client.

    Declaration
    public static bool IsThinClient(this WorldUnmanaged world)
    Parameters
    Type Name Description
    WorldUnmanaged world

    A Unity.Entities.WorldUnmanaged instance

    Returns
    Type Description
    bool

    Whether world is a thin client world.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)