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.
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
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 |
---|---|---|
System.UInt32 | value |
Properties
Value
The internal value for this object.
Declaration
public uint Value { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Methods
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
System.ValueType.Equals(System.Object)
Equals(NetworkSceneId)
Declaration
public bool Equals(NetworkSceneId other)
Parameters
Type | Name | Description |
---|---|---|
NetworkSceneId | other |
Returns
Type | Description |
---|---|
System.Boolean |
Implements
System.IEquatable<T>.Equals(T)
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
System.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 |
---|---|
System.Boolean | True if zero. |
ToString()
Returns a string like SceneId:value.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | String representation of this object. |
Overrides
System.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 |
---|---|
System.Boolean |
Inequality(NetworkSceneId, NetworkSceneId)
Declaration
public static bool operator !=(NetworkSceneId c1, NetworkSceneId c2)
Parameters
Type | Name | Description |
---|---|---|
NetworkSceneId | c1 | |
NetworkSceneId | c2 |
Returns
Type | Description |
---|---|
System.Boolean |