Struct NetworkSceneId | Multiplayer HLAPI | 1.0.8
docs.unity.cn
    Show / Hide Table of Contents

    Struct NetworkSceneId

    This is used to identify networked objects in a scene. These values are allocated in the editor and are persistent for the lifetime of the object in the scene.

    Namespace: UnityEngine.Networking
    Syntax
    [Serializable]
    [Obsolete("The high level API classes are deprecated and will be removed in the future.")]
    public struct NetworkSceneId : IEquatable<NetworkSceneId>

    Constructors

    NetworkSceneId(UInt32)

    Declaration
    public NetworkSceneId(uint value)
    Parameters
    Type Name Description
    UInt32 value

    Properties

    Value

    The internal value for this object.

    Declaration
    public uint Value { get; }
    Property Value
    Type Description
    UInt32

    Methods

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean
    Overrides
    ValueType.Equals(Object)

    Equals(NetworkSceneId)

    Declaration
    public bool Equals(NetworkSceneId other)
    Parameters
    Type Name Description
    NetworkSceneId other
    Returns
    Type Description
    Boolean

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    ValueType.GetHashCode()

    IsEmpty()

    Returns true if the value is zero. Non-scene objects - ones which are spawned at runtime will have a sceneId of zero.

    Declaration
    public bool IsEmpty()
    Returns
    Type Description
    Boolean

    True if zero.

    ToString()

    Returns a string like SceneId:value.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    String representation of this object.

    Overrides
    ValueType.ToString()

    Operators

    Equality(NetworkSceneId, NetworkSceneId)

    Declaration
    public static bool operator ==(NetworkSceneId c1, NetworkSceneId c2)
    Parameters
    Type Name Description
    NetworkSceneId c1
    NetworkSceneId c2
    Returns
    Type Description
    Boolean

    Inequality(NetworkSceneId, NetworkSceneId)

    Declaration
    public static bool operator !=(NetworkSceneId c1, NetworkSceneId c2)
    Parameters
    Type Name Description
    NetworkSceneId c1
    NetworkSceneId c2
    Returns
    Type Description
    Boolean
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 15 December 2020