Photon Fusion 2.0.4

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. More...
 

Public Attributes

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 NetworkPrefabId PrefabId
 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...
 

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.

Member Data Documentation

◆ DontDestroyOnLoad

readonly bool DontDestroyOnLoad

Indicates whether the network object should not be destroyed on load.

◆ IsSynchronous

readonly bool IsSynchronous

Indicates whether the operation is synchronous.

◆ Meta

readonly NetworkObjectMeta Meta

The metadata of the network object.

◆ PrefabId

readonly NetworkPrefabId PrefabId

The identifier of the prefab.

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.