ID for a NetworkObject Prefab which has been cataloged in a NetworkProjectConfig.PrefabTable.
More...
Inherits INetworkStruct, and IEquatable< NetworkObjectTypeId >.
|
bool | Equals (NetworkObjectTypeId other) |
| Checks if the current NetworkObjectTypeId instance is equal to another NetworkObjectTypeId instance.
|
|
override bool | Equals (object obj) |
| Determines whether the specified object is equal to the current NetworkObjectTypeId instance.
|
|
override int | GetHashCode () |
| Generates a hash code for the current NetworkObjectTypeId instance.
|
|
override string | ToString () |
| Returns a string that represents the current NetworkObjectTypeId instance.
|
|
|
uint | _value0 |
| Represents the first part of the value of a NetworkObjectTypeId.
|
|
uint | _value1 |
| Represents the second part of the value of a NetworkObjectTypeId.
|
|
|
const int | ALIGNMENT = 4 |
| Represents the alignment of a NetworkObjectTypeId in memory.
|
|
const int | MAX_SCENE_OBJECT_INDEX = (1 << SCENE_OBJECT_INDEX_BITS) - 1 |
| Represents the maximum number of SceneObjects that can be represented by a NetworkObjectTypeId.
|
|
const int | SIZE = 8 |
| Represents the size of a NetworkObjectTypeId in bytes.
|
|
const ushort | STRUCT_TYPE_PLAYERDATA = 1 |
|
|
uint | AsCustom [get] |
| Gets the raw uint value representation of the NetworkObjectTypeId assuming it is a Custom type.
|
|
ushort | AsInternalStructId [get] |
| Gets the ushort value representation of the NetworkObjectTypeId assuming it is an InternalStruct type.
|
|
NetworkPrefabId | AsPrefabId [get] |
| Gets the NetworkPrefabId representation of the NetworkObjectTypeId assuming it is a Prefab.
|
|
NetworkSceneObjectId | AsSceneObjectId [get] |
| Gets the NetworkSceneObjectId representation of the NetworkObjectTypeId assuming it is a SceneObject.
|
|
static EqualityComparer | Comparer = new EqualityComparer() [get] |
| An instance of the NetworkObjectTypeId EqualityComparer class.
|
|
bool | IsCustom [get] |
| Checks if the NetworkObjectTypeId is a Custom type.
|
|
bool | IsNone [get] |
| Checks if the NetworkObjectTypeId is invalid.
|
|
bool | IsPrefab [get] |
| Checks if the NetworkObjectTypeId is a Prefab.
|
|
bool | IsSceneObject [get] |
| Checks if the NetworkObjectTypeId is a SceneObject.
|
|
bool | IsStruct [get] |
| Checks if the NetworkObjectTypeId is an InternalStruct.
|
|
bool | IsValid [get] |
| Checks if the NetworkObjectTypeId is valid.
|
|
NetworkTypeIdKind | Kind [get] |
| Gets the kind of the NetworkObjectTypeId.
|
|
static NetworkObjectTypeId | PlayerData [get] |
| Represents a NetworkObjectTypeId for the PlayerData.
|
|
ID for a NetworkObject Prefab which has been cataloged in a NetworkProjectConfig.PrefabTable.
◆ Equals() [1/2]
Checks if the current NetworkObjectTypeId instance is equal to another NetworkObjectTypeId instance.
- Parameters
-
other | The other NetworkObjectTypeId instance to compare with the current instance. |
◆ Equals() [2/2]
override bool Equals |
( |
object |
obj | ) |
|
Determines whether the specified object is equal to the current NetworkObjectTypeId instance.
- Parameters
-
obj | The object to compare with the current NetworkObjectTypeId instance. |
◆ FromCustom()
Creates a NetworkObjectTypeId from a raw uint value representing a Custom type.
- Parameters
-
raw | The raw uint value to use. |
- Returns
- A NetworkObjectTypeId that represents a Custom type with the given raw value.
◆ FromPrefabId()
Creates a NetworkObjectTypeId from a NetworkPrefabId.
- Parameters
-
prefabId | The NetworkPrefabId to use. |
- Returns
- A NetworkObjectTypeId that represents a Prefab with the given NetworkPrefabId.
- Exceptions
-
ArgumentException | Thrown when the provided NetworkPrefabId is not valid. |
◆ FromSceneRefAndObjectIndex()
Creates a NetworkObjectTypeId from a SceneRef, an object index, and an optional NetworkSceneLoadId.
- Parameters
-
sceneRef | The SceneRef to use. |
objIndex | The object index to use. |
loadId | The NetworkSceneLoadId to use. Defaults to default(NetworkSceneLoadId). |
- Returns
- A NetworkObjectTypeId that represents a SceneObject with the given SceneRef, object index, and NetworkSceneLoadId.
- Exceptions
-
ArgumentException | Thrown when the provided SceneRef is not valid. |
ArgumentOutOfRangeException | Thrown when the provided object index is out of range. |
◆ FromStruct()
Creates a NetworkObjectTypeId from a ushort value representing an InternalStruct type.
- Parameters
-
structId | The ushort value to use. |
- Returns
- A NetworkObjectTypeId that represents an InternalStruct type with the given ushort value.
◆ operator NetworkObjectTypeId()
Converts a NetworkPrefabId instance to a NetworkObjectTypeId instance.
- Parameters
-
prefabId | The NetworkPrefabId instance to convert. |
- Returns
- A NetworkObjectTypeId instance that represents a Prefab with the given NetworkPrefabId.
◆ AsCustom
Gets the raw uint value representation of the NetworkObjectTypeId assuming it is a Custom type.
The raw uint value representation of the NetworkObjectTypeId.
- Exceptions
-
InvalidOperationException | Thrown when the NetworkObjectTypeId is not a Custom type. |
◆ AsInternalStructId
ushort AsInternalStructId |
|
get |
Gets the ushort value representation of the NetworkObjectTypeId assuming it is an InternalStruct type.
The ushort value representation of the NetworkObjectTypeId.
- Exceptions
-
InvalidOperationException | Thrown when the NetworkObjectTypeId is not an InternalStruct type. |
◆ AsPrefabId
Gets the NetworkPrefabId representation of the NetworkObjectTypeId assuming it is a Prefab.
The NetworkPrefabId representation of the NetworkObjectTypeId.
- Exceptions
-
InvalidOperationException | Thrown when the NetworkObjectTypeId is not a Prefab. |
◆ AsSceneObjectId
Gets the NetworkSceneObjectId representation of the NetworkObjectTypeId assuming it is a SceneObject.
The NetworkSceneObjectId representation of the NetworkObjectTypeId.
- Exceptions
-
InvalidOperationException | Thrown when the NetworkObjectTypeId is not a SceneObject. |