Photon Bolt Engine API 1.3

Properties | List of all members
Photon.Bolt.BoltEntitySettingsModifier Class Reference

Modifier for bolt entity settings before it's attached More...

Inheritance diagram for Photon.Bolt.BoltEntitySettingsModifier:

Properties

bool allowInstantiateOnClient [get, set]
 Enable or disable instantiation of the entity by clients More...
 
bool alwaysProxy [get, set]
 True if this entity is always owned by the server More...
 
int autoFreezeProxyFrames [get, set]
 The network update rate for this entity More...
 
bool clientPredicted [get, set]
 Enable or disable client prediction on the entity More...
 
bool persistThroughSceneLoads [get, set]
 Whether the entity is persistence between scenes More...
 
PrefabId prefabId [get, set]
 The prefab identifier More...
 
UniqueId sceneId [get, set]
 A unique identifier present on scene entities More...
 
bool sceneObjectAutoAttach [get, set]
 True if bolt should automatically attach the entity during instantiation More...
 
bool sceneObjectDestroyOnDetach [get, set]
 
UniqueId serializerId [get, set]
 A unique identifier of this entity state serializer More...
 
int updateRate [get, set]
 The network update rate for this entity More...
 

Detailed Description

Modifier for bolt entity settings before it's attached

Example: Attaching an entity with custom settings

if (BoltNetwork.isServer) {
BoltEntity entity = gameObject.AddComponent<BoltEntity>();
using (var mod = entity.ModifySettings()) {
mod.persistThroughSceneLoads = true;
mod.allowInstantiateOnClient = false;
mod.clientPredicted = false;
mod.prefabId = prefabId;
mod.updateRate = 1;
mod.sceneId = Photon.Bolt.UniqueId.None;
mod.serializerId = state;
}
BoltNetwork.Attach(entity.gameObject);
}

Property Documentation

◆ allowInstantiateOnClient

bool Photon.Bolt.BoltEntitySettingsModifier.allowInstantiateOnClient
getset

Enable or disable instantiation of the entity by clients

◆ alwaysProxy

bool Photon.Bolt.BoltEntitySettingsModifier.alwaysProxy
getset

True if this entity is always owned by the server

◆ autoFreezeProxyFrames

int Photon.Bolt.BoltEntitySettingsModifier.autoFreezeProxyFrames
getset

The network update rate for this entity

◆ clientPredicted

bool Photon.Bolt.BoltEntitySettingsModifier.clientPredicted
getset

Enable or disable client prediction on the entity

◆ persistThroughSceneLoads

bool Photon.Bolt.BoltEntitySettingsModifier.persistThroughSceneLoads
getset

Whether the entity is persistence between scenes

◆ prefabId

PrefabId Photon.Bolt.BoltEntitySettingsModifier.prefabId
getset

The prefab identifier

◆ sceneId

UniqueId Photon.Bolt.BoltEntitySettingsModifier.sceneId
getset

A unique identifier present on scene entities

◆ sceneObjectAutoAttach

bool Photon.Bolt.BoltEntitySettingsModifier.sceneObjectAutoAttach
getset

True if bolt should automatically attach the entity during instantiation

◆ sceneObjectDestroyOnDetach

bool Photon.Bolt.BoltEntitySettingsModifier.sceneObjectDestroyOnDetach
getset

◆ serializerId

UniqueId Photon.Bolt.BoltEntitySettingsModifier.serializerId
getset

A unique identifier of this entity state serializer

◆ updateRate

int Photon.Bolt.BoltEntitySettingsModifier.updateRate
getset

The network update rate for this entity

Photon.Bolt.BoltEntitySettingsModifier.prefabId
PrefabId prefabId
The prefab identifier
Definition: BoltEntity.cs:95
Photon.Bolt
Definition: BoltHitbox.cs:4
Photon
Definition: BoltHitbox.cs:4