Photon Fusion 2.0.0

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

Can store up to 8 active scenes and allows for duplicates. Each write increases Version which can be used to generate unique scene objects ids for when a scene is supposed to be reloaded. More...

Inherits INetworkStruct, and IEquatable< NetworkSceneInfo >.

Public Member Functions

int AddSceneRef (SceneRef sceneRef, LoadSceneMode loadSceneMode=LoadSceneMode.Single, LocalPhysicsMode localPhysicsMode=LocalPhysicsMode.None, bool activeOnLoad=false)
 Adds a scene to the list.
 
bool Equals (NetworkSceneInfo other)
 Compares two NetworkSceneInfo for equality.
 
override bool Equals (object obj)
 Compares two NetworkSceneInfo for equality.
 
override int GetHashCode ()
 Get the hash code of the NetworkSceneInfo
 
int IndexOf ((SceneRef SceneRef, NetworkLoadSceneParameters SceneParams) scene)
 
int IndexOf (SceneRef sceneRef, NetworkLoadSceneParameters sceneParams)
 Gets the index of the given scene.
 
bool RemoveSceneRef (SceneRef sceneRef)
 Removes a scene from the list.
 
override string ToString ()
 String representation of the NetworkSceneInfo
 

Static Public Member Functions

static implicit operator NetworkSceneInfo (SceneRef sceneRef)
 Implicit conversion to NetworkSceneInfo
 

Static Public Attributes

const int MaxScenes = 8
 Max number of scenes that can be stored.
 
const int SIZE = 52
 The size of the struct in bytes.
 
const int WORD_COUNT = 13
 The size of the struct in words.
 

Properties

int SceneCount [get]
 Total Scene Count.
 
FixedArray< NetworkLoadSceneParametersSceneParams [get]
 The scenes load parameters list.
 
FixedArray< SceneRefScenes [get]
 The scenes list.
 
int Version [get]
 Version number.
 

Detailed Description

Can store up to 8 active scenes and allows for duplicates. Each write increases Version which can be used to generate unique scene objects ids for when a scene is supposed to be reloaded.

Member Function Documentation

◆ AddSceneRef()

int AddSceneRef ( SceneRef  sceneRef,
LoadSceneMode  loadSceneMode = LoadSceneMode::Single,
LocalPhysicsMode  localPhysicsMode = LocalPhysicsMode::None,
bool  activeOnLoad = false 
)

Adds a scene to the list.

Parameters
sceneRefScene to add
loadSceneModeLoad scene mode
localPhysicsModeLocal physics mode
activeOnLoadSignals if the scene should be active on load
Returns
Returns the index of the scene or -1 if the scene could not be added

◆ Equals() [1/2]

bool Equals ( NetworkSceneInfo  other)

Compares two NetworkSceneInfo for equality.

Parameters
otherThe other NetworkSceneInfo
Returns
Returns true if the two NetworkSceneInfo are equal

◆ Equals() [2/2]

override bool Equals ( object  obj)

Compares two NetworkSceneInfo for equality.

Parameters
objThe other NetworkSceneInfo
Returns
Returns true if the two NetworkSceneInfo are equal

◆ GetHashCode()

override int GetHashCode ( )

Get the hash code of the NetworkSceneInfo

Returns
Hast code of the NetworkSceneInfo

◆ IndexOf()

int IndexOf ( SceneRef  sceneRef,
NetworkLoadSceneParameters  sceneParams 
)

Gets the index of the given scene.

Parameters
sceneRefSceneRef to look for
sceneParamsScene parameters to look for
Returns
Returns the index of the scene or -1 if not found

◆ operator NetworkSceneInfo()

static implicit operator NetworkSceneInfo ( SceneRef  sceneRef)
static

Implicit conversion to NetworkSceneInfo

Parameters
sceneRefSceneRef to convert
Returns
Returns a NetworkSceneInfo instance

◆ RemoveSceneRef()

bool RemoveSceneRef ( SceneRef  sceneRef)

Removes a scene from the list.

Parameters
sceneRefScene to remove
Returns
Returns true if the scene was removed