Photon Bolt Engine API
Networking Middleware
Public Member Functions | Properties | List of all members
BoltGlobalBehaviourAttribute Class Reference

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

Inheritance diagram for BoltGlobalBehaviourAttribute:

Public Member Functions

 BoltGlobalBehaviourAttribute ()
 
 BoltGlobalBehaviourAttribute (BoltNetworkModes mode)
 
 BoltGlobalBehaviourAttribute (params string[] scenes)
 
 BoltGlobalBehaviourAttribute (BoltNetworkModes mode, params string[] scenes)
 

Properties

BoltNetworkModes Mode [get]
 Sets this behaviour to run only in server or client network mode More...
 
string [] Scenes [get]
 A list of scenes for this behaviour to run on 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]

BoltGlobalBehaviourAttribute.BoltGlobalBehaviourAttribute ( )
inline

◆ BoltGlobalBehaviourAttribute() [2/4]

BoltGlobalBehaviourAttribute.BoltGlobalBehaviourAttribute ( BoltNetworkModes  mode)
inline

◆ BoltGlobalBehaviourAttribute() [3/4]

BoltGlobalBehaviourAttribute.BoltGlobalBehaviourAttribute ( params string []  scenes)
inline

◆ BoltGlobalBehaviourAttribute() [4/4]

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

Property Documentation

◆ Mode

BoltNetworkModes BoltGlobalBehaviourAttribute.Mode
get

Sets this behaviour to run only in server or client network mode

◆ Scenes

string [] BoltGlobalBehaviourAttribute.Scenes
get

A list of scenes for this behaviour to run on