Photon Bolt Engine API 1.3

Public Member Functions | Properties | List of all members
Photon.Bolt.BoltGlobalBehaviourAttribute Class Reference

Sets the network mode and scenes that a Bolt.GlobalEventListener should be run on More...

Inheritance diagram for Photon.Bolt.BoltGlobalBehaviourAttribute:

Public Member Functions

 BoltGlobalBehaviourAttribute ()
 GlobalBehaviour will run both on Server and Client and on all scenes. More...
 
 BoltGlobalBehaviourAttribute (BoltNetworkModes mode)
 GlobalBehaviour will run on the specified mode and on all scenes. More...
 
 BoltGlobalBehaviourAttribute (BoltNetworkModes mode, params string[] scenes)
 GlobalBehaviour will run on the specified mode and only on the specified scenes. More...
 
 BoltGlobalBehaviourAttribute (params string[] scenes)
 GlobalBehaviour will run on both Server and Client but only on the specified scenes. You can use BoltScenes to select the available scenes. More...
 

Properties

BoltNetworkModes Mode [get]
 Sets this behaviour to run only in server or client network mode. BoltNetworkModes for more info. More...
 
string[] Scenes [get]
 A list of scenes for this behaviour to run on. You can use a string with the name of the Scene or use BoltScenes. More...
 

Detailed Description

Sets the network mode and scenes that a Bolt.GlobalEventListener should be run on

Example: Setting up a server-side event listener to spawn players

[BoltGlobalBehaviour(BoltNetworkModes.Server)]
public class BoltServerCallbacks: Bolt.GlobalEventListener
{
public override void SceneLoadLocalDone(string map) {
SpawnServerPlayer();
}
public override void SceneLoadRemoteDone(BoltConnection connection) {
SpawnRemotePlayer(connection);
}
}

Constructor & Destructor Documentation

◆ BoltGlobalBehaviourAttribute() [1/4]

Photon.Bolt.BoltGlobalBehaviourAttribute.BoltGlobalBehaviourAttribute ( )
inline

GlobalBehaviour will run both on Server and Client and on all scenes.

◆ BoltGlobalBehaviourAttribute() [2/4]

Photon.Bolt.BoltGlobalBehaviourAttribute.BoltGlobalBehaviourAttribute ( BoltNetworkModes  mode)
inline

GlobalBehaviour will run on the specified mode and on all scenes.

Parameters
modeSelect the BoltNetworkModes in which this GlobalBehaviour will execute.

◆ BoltGlobalBehaviourAttribute() [3/4]

Photon.Bolt.BoltGlobalBehaviourAttribute.BoltGlobalBehaviourAttribute ( params string[]  scenes)
inline

GlobalBehaviour will run on both Server and Client but only on the specified scenes. You can use BoltScenes to select the available scenes.

Parameters
scenesList of scene names

◆ BoltGlobalBehaviourAttribute() [4/4]

Photon.Bolt.BoltGlobalBehaviourAttribute.BoltGlobalBehaviourAttribute ( BoltNetworkModes  mode,
params string[]  scenes 
)
inline

GlobalBehaviour will run on the specified mode and only on the specified scenes.

Parameters
modeSelect the BoltNetworkModes in which this GlobalBehaviour will execute.
scenesList of scene names

Property Documentation

◆ Mode

BoltNetworkModes Photon.Bolt.BoltGlobalBehaviourAttribute.Mode
get

Sets this behaviour to run only in server or client network mode. BoltNetworkModes for more info.

◆ Scenes

string [] Photon.Bolt.BoltGlobalBehaviourAttribute.Scenes
get

A list of scenes for this behaviour to run on. You can use a string with the name of the Scene or use BoltScenes.

Photon.Bolt.BoltNetworkModes
BoltNetworkModes
Definition: BoltNetwork.cs:13