Photon Fusion 2.0.3

Classes | Static Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
NetworkProjectConfigAsset Class Reference

Manages and references the current instance of NetworkProjectConfig More...

Inherits FusionGlobalScriptableObject< NetworkProjectConfigAsset >.

Classes

struct  SerializableSimulationBehaviourMeta
 An auto-generated list containing meta information about all the SimulationBehaviours in the project, e.g. execution order. More...
 

Static Public Member Functions

static bool TryGetGlobal (out NetworkProjectConfigAsset global)
 Try to get the current NetworkProjectConfig instance. More...
 
static void UnloadGlobal ()
 Unload the current NetworkProjectConfig instance. More...
 

Public Attributes

SerializableSimulationBehaviourMeta[] BehaviourMeta = Array.Empty<SerializableSimulationBehaviourMeta>()
 An auto-generated list containing meta information about all the SimulationBehaviours in the project, e.g. execution order. More...
 
NetworkProjectConfig Config = new NetworkProjectConfig()
 The current NetworkProjectConfig instance. More...
 
NetworkPrefabTableOptions PrefabOptions = NetworkPrefabTableOptions.Default
 Options for the NetworkPrefabTable. More...
 
List< INetworkPrefabSourcePrefabs = new List<INetworkPrefabSource>()
 An auto-generated list containing source information (e.g. Resource path, address, static reference) for all the prefabs that can be spawned, i.e. the ones with NetworkObject component and NetworkObject.IsSpawnable enabled.
Additional prefabs can registered at runtime with NetworkPrefabTable.TryAddSource. More...
 

Protected Member Functions

override void OnDisable ()
 Unloads all prefabs. More...
 
- Protected Member Functions inherited from FusionGlobalScriptableObject< NetworkProjectConfigAsset >
virtual void OnLoadedAsGlobal ()
 Invoked when the instance is loaded as global. More...
 
virtual void OnUnloadedAsGlobal (bool destroyed)
 Invoked when the instance is unloaded as global. More...
 

Properties

static NetworkProjectConfigAsset Global [get]
 The current NetworkProjectConfig instance. More...
 
static bool IsGlobalLoaded [get]
 True if the NetworkProjectConfig instance exists, otherwise false. More...
 
- Properties inherited from FusionGlobalScriptableObject< NetworkProjectConfigAsset >
static T GlobalInternal [get, set]
 A singleton instance-like property. Loads or returns the current global instance. Derived classes can package it in a property with a different name. Throws if loading an instance failed. More...
 
bool IsGlobal [get]
 Is this instance a global instance. More...
 
static bool IsGlobalLoadedInternal [get]
 Returns true if a global instance is loaded. Compared to GlobalInternal, it does not attempt to load an instance. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from FusionGlobalScriptableObject< NetworkProjectConfigAsset >
static bool TryGetGlobalInternal (out T global)
 Loads or returns the current global instance. Returns null if loading an instance failed. More...
 
static bool UnloadGlobalInternal ()
 Unloads the global instance if it is loaded. More...
 

Detailed Description

Manages and references the current instance of NetworkProjectConfig

Member Function Documentation

◆ OnDisable()

override void OnDisable ( )
protectedvirtual

Unloads all prefabs.

Reimplemented from FusionGlobalScriptableObject< NetworkProjectConfigAsset >.

◆ TryGetGlobal()

static bool TryGetGlobal ( out NetworkProjectConfigAsset  global)
static

Try to get the current NetworkProjectConfig instance.

Parameters
globalNetworkProjectConfig instance if it exists, otherwise null.
Returns
True if the NetworkProjectConfig instance exists, otherwise false.

◆ UnloadGlobal()

static void UnloadGlobal ( )
static

Unload the current NetworkProjectConfig instance.

Member Data Documentation

◆ BehaviourMeta

An auto-generated list containing meta information about all the SimulationBehaviours in the project, e.g. execution order.

◆ Config

The current NetworkProjectConfig instance.

◆ PrefabOptions

Options for the NetworkPrefabTable.

◆ Prefabs

List<INetworkPrefabSource> Prefabs = new List<INetworkPrefabSource>()

An auto-generated list containing source information (e.g. Resource path, address, static reference) for all the prefabs that can be spawned, i.e. the ones with NetworkObject component and NetworkObject.IsSpawnable enabled.
Additional prefabs can registered at runtime with NetworkPrefabTable.TryAddSource.

Property Documentation

◆ Global

NetworkProjectConfigAsset Global
staticget

The current NetworkProjectConfig instance.

◆ IsGlobalLoaded

bool IsGlobalLoaded
staticget

True if the NetworkProjectConfig instance exists, otherwise false.