Represents the context for acquiring a prefab instance for a network object. This struct is unsafe because it uses pointers. More...
Public Member Functions | |
NetworkObjectAcquireContext (NetworkObjectTypeId typeId, NetworkObjectMeta meta=null, bool isSynchronous=true, bool dontDestroyOnLoad=false, NetworkObject attachableInstance=null) | |
Initializes a new instance of the NetworkPrefabAcquireContext struct with the specified parameters. More... | |
Public Attributes | |
readonly NetworkObject | AttachableInstance |
Attachable instance. Usually this is the object previously passed in NetworkRunner.RegisterSceneObjects More... | |
readonly bool | DontDestroyOnLoad |
Indicates whether the network object should not be destroyed on load. More... | |
readonly bool | IsSynchronous |
Indicates whether the operation is synchronous. More... | |
readonly NetworkObjectMeta | Meta |
The metadata of the network object. More... | |
readonly NetworkObjectTypeId | TypeId |
The identifier of the prefab. More... | |
Properties | |
int * | Data [get] |
Gets the data pointer to the first word of this NetworkObject's data block. More... | |
bool | HasHeader [get] |
Checks if the Header is not null. More... | |
NetworkObjectHeader * | Header [get] |
Returns the Header if it is not null; otherwise, returns null. More... | |
NetworkPrefabId? | PrefabId [get] |
Prefab id or null if the type is not a prefab. More... | |
Represents the context for acquiring a prefab instance for a network object. This struct is unsafe because it uses pointers.
NetworkObjectAcquireContext | ( | NetworkObjectTypeId | typeId, |
NetworkObjectMeta | meta = null , |
||
bool | isSynchronous = true , |
||
bool | dontDestroyOnLoad = false , |
||
NetworkObject | attachableInstance = null |
||
) |
Initializes a new instance of the NetworkPrefabAcquireContext struct with the specified parameters.
typeId | The identifier of the type. |
meta | The metadata of the network object. |
isSynchronous | Indicates whether the operation is synchronous. |
dontDestroyOnLoad | Indicates whether the network object should not be destroyed on load. |
attachableInstance | TODO |
readonly NetworkObject AttachableInstance |
Attachable instance. Usually this is the object previously passed in NetworkRunner.RegisterSceneObjects
readonly bool DontDestroyOnLoad |
Indicates whether the network object should not be destroyed on load.
readonly bool IsSynchronous |
Indicates whether the operation is synchronous.
readonly NetworkObjectMeta Meta |
The metadata of the network object.
readonly NetworkObjectTypeId TypeId |
The identifier of the prefab.
|
get |
Gets the data pointer to the first word of this NetworkObject's data block.
InvalidOperationException | Thrown when the Header is null. |
|
get |
Checks if the Header is not null.
|
get |
Returns the Header if it is not null; otherwise, returns null.
|
get |
Prefab id or null if the type is not a prefab.