Photon Fusion 2.0.0

Public Member Functions | Public Attributes | Properties | List of all members
NetworkPrefabAcquireContext Struct Reference

Represents the context for acquiring a prefab instance for a network object. This struct is unsafe because it uses pointers. More...

Public Member Functions

 NetworkPrefabAcquireContext (NetworkPrefabId prefabId, NetworkObjectMeta meta=null, bool isSynchronous=true, bool dontDestroyOnLoad=false)
 Initializes a new instance of the NetworkPrefabAcquireContext struct with the specified parameters.
 

Public Attributes

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 NetworkPrefabId PrefabId
 The identifier of the prefab.
 

Properties

int * Data [get]
 Gets the data pointer to the first word of this NetworkObject's data block.
 
bool HasHeader [get]
 Checks if the Header is not null.
 

Detailed Description

Represents the context for acquiring a prefab instance for a network object. This struct is unsafe because it uses pointers.

Constructor & Destructor Documentation

◆ NetworkPrefabAcquireContext()

NetworkPrefabAcquireContext ( NetworkPrefabId  prefabId,
NetworkObjectMeta  meta = null,
bool  isSynchronous = true,
bool  dontDestroyOnLoad = false 
)

Initializes a new instance of the NetworkPrefabAcquireContext struct with the specified parameters.

Parameters
prefabIdThe identifier of the prefab.
metaThe metadata of the network object.
isSynchronousIndicates whether the operation is synchronous.
dontDestroyOnLoadIndicates whether the network object should not be destroyed on load.

Property Documentation

◆ Data

int* Data
get

Gets the data pointer to the first word of this NetworkObject's data block.

Returns
Data pointer to the first word of this NetworkObject's data block.
Exceptions
InvalidOperationExceptionThrown when the Header is null.

◆ HasHeader

bool HasHeader
get

Checks if the Header is not null.

Returns
True if the Header is not null; otherwise, false.