Photon Fusion 2.0.3

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 More...
 
bool Equals (NetworkSceneInfo other)
 Compares two NetworkSceneInfo for equality More...
 
override bool Equals (object obj)
 Compares two NetworkSceneInfo for equality More...
 
override int GetHashCode ()
 Get the hash code of the NetworkSceneInfo More...
 
int IndexOf ((SceneRef SceneRef, NetworkLoadSceneParameters SceneParams) scene)
 
int IndexOf (SceneRef sceneRef, NetworkLoadSceneParameters sceneParams)
 Gets the index of the given scene More...
 
bool RemoveSceneRef (SceneRef sceneRef)
 Removes a scene from the list More...
 
override string ToString ()
 String representation of the NetworkSceneInfo More...
 

Static Public Member Functions

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

Static Public Attributes

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

Properties

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

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

◆ ToString()

override string ToString ( )

String representation of the NetworkSceneInfo

Member Data Documentation

◆ MaxScenes

const int MaxScenes = 8
static

Max number of scenes that can be stored

◆ SIZE

const int SIZE = 52
static

The size of the struct in bytes

◆ WORD_COUNT

const int WORD_COUNT = 13
static

The size of the struct in words

Property Documentation

◆ SceneCount

int SceneCount
get

Total Scene Count

◆ SceneParams

The scenes load parameters list

◆ Scenes

FixedArray<SceneRef> Scenes
get

The scenes list

◆ Version

int Version
get

Version number