Quantum 3
3.0.9
The Entity View Updater is essential. An instance needs to be present to create Entity Views as the simulation view representations based on the Quantum.EntityView components. More...
Public Member Functions | |
| void | AddViewComponent (IQuantumViewComponent viewComponent) |
| Attach a non-entity view component that is then updated by the EntityViewUpdater. The QuantumViewComponent<T>.OnActivate will be deferred until the next view update. More... | |
| void | Awake () |
| Unity Awake() callback, register callbacks and load view contexts. More... | |
| QuantumEntityView | GetPrefab (EntityRef entityRef) |
| Obsolete: Use GetView instead More... | |
| QuantumEntityView | GetView (EntityRef entityRef) |
| Try to get the view instance for the given Quantum entity reference. More... | |
| void | RemoveViewComponent (IQuantumViewComponent viewComponent) |
| Remove a view component from being updated by the EntityViewUpdater. The removing of the view component is being deferred until the next late update. More... | |
| void | SetCurrentGame (QuantumGame game, bool updateGizmoContext=true) |
| Set the current observed game. More... | |
| void | SetTeleportOnce () |
| Obsolete: Use TeleportAllEntities() instead. More... | |
| void | TeleportAllEntities () |
| Set all entity views to teleport on the next update. More... | |
Public Attributes | |
| bool | AutoFindMapData = true |
| Disable you don't intend to use MapData component. More... | |
| QuantumMapData | MapData => _mapData |
| Provides access to MapData when deriving from this class for example. More... | |
| QuantumGame | ObservedGame => _observedGame |
| Returns the currently observed game. More... | |
| QuantumSnapshotInterpolationTimer | SnapshotInterpolation = new QuantumSnapshotInterpolationTimer() |
| Configuration of the snapshot interpolation mode of EntityViews. More... | |
| Transform | ViewParentTransform = null |
| "Optionally provide a transform that all entity views will be parented under." More... | |
Protected Member Functions | |
| virtual void | ActivateMapEntityInstance (QuantumEntityView instance, Vector3? position=null, Quaternion? rotation=null) |
| Activates a map entity instance. More... | |
| virtual QuantumEntityView | CreateEntityViewInstance (Quantum.EntityView asset, Vector3? position=null, Quaternion? rotation=null) |
| Creates a new entity view instance. More... | |
| virtual void | DestroyEntityView (QuantumGame game, QuantumEntityView view) |
| Destroys the entity view instance and removes it from the active views list. More... | |
| virtual void | DestroyEntityViewInstance (QuantumEntityView instance) |
| Destroys an entity view. More... | |
| virtual void | DisableMapEntityInstance (QuantumEntityView instance) |
| Disabled a map entity instance. More... | |
| virtual void | LoadMissingPrefab (Quantum.EntityView viewAsset) |
| Is triggered when EntityView.Prefab is null and expects to be set after this callback. More... | |
Protected Attributes | |
| HashSet< EntityRef > | ActiveEntities => _activeEntities |
| Provides access to the active entities. More... | |
| Dictionary< EntityRef, QuantumEntityView > | ActiveViews => _activeViews |
| Provides access to the active views. More... | |
| HashSet< EntityRef > | RemoveEntities => _removeEntities |
| Privates access to the entities that should be removed. More... | |
| Boolean | Teleport => _teleport |
Returns true when the entities are marked to teleport next update. Set by TeleportAllEntities. More... | |
Properties | |
| Dictionary< Type, IQuantumViewContext > | Context [get] |
| Access all view contexts that could be loaded in the scene as children of the EntityViewUpdater. More... | |
| IQuantumEntityViewCulling | Culling [get, set] |
| Get or set the EntityViewCulling. If not set, the EntityViewUpdater will use the first found culling class in the hierarchy. More... | |
| IQuantumEntityViewPool | Pool [get, set] |
| Get or set the EntityViewPool. If not set, the EntityViewUpdater will use the first found pool in the hierarchy. More... | |
The Entity View Updater is essential. An instance needs to be present to create Entity Views as the simulation view representations based on the Quantum.EntityView components.
| QuantumEntityView Quantum.QuantumEntityViewUpdater.GetPrefab | ( | EntityRef | entityRef | ) |
Obsolete: Use GetView instead
|
inline |
Try to get the view instance for the given Quantum entity reference.
| entityRef |
| void Quantum.QuantumEntityViewUpdater.SetTeleportOnce | ( | ) |
Obsolete: Use TeleportAllEntities() instead.
|
inline |
Set all entity views to teleport on the next update.
|
inline |
Set the current observed game.
| game | The game to observe. |
| updateGizmoContext | Register this EntityViewUpdate with the game gizmos. |
|
inline |
Unity Awake() callback, register callbacks and load view contexts.
|
inline |
Attach a non-entity view component that is then updated by the EntityViewUpdater. The QuantumViewComponent<T>.OnActivate will be deferred until the next view update.
Does not add the view component if it already was added (e.g. IQuantumViewComponent.IsInitialized returns true).
| viewComponent | View component instance |
|
inline |
Remove a view component from being updated by the EntityViewUpdater. The removing of the view component is being deferred until the next late update.
| viewComponent | View component instance to remove |
|
inlineprotectedvirtual |
Destroys the entity view instance and removes it from the active views list.
Can be overwritten in derived class.
| game | The game reference the entity belongs to. |
| view | The entity view object. |
|
inlineprotectedvirtual |
Creates a new entity view instance.
Can be overwritten in derived class.
| asset | View asset. |
| position | World position. |
| rotation | Initial rotation. |
|
inlineprotectedvirtual |
Destroys an entity view.
Can be overwritten in derived class.
| instance | Instance to destroy. |
|
inlineprotectedvirtual |
Activates a map entity instance.
Can be overwritten in derived class.
|
inlineprotectedvirtual |
Disabled a map entity instance.
Can be overwritten in derived class.
|
inlineprotectedvirtual |
Is triggered when EntityView.Prefab is null and expects to be set after this callback.
Can be overwritten in derived class.
| viewAsset | View asset to load. |
| Transform Quantum.QuantumEntityViewUpdater.ViewParentTransform = null |
"Optionally provide a transform that all entity views will be parented under."
| bool Quantum.QuantumEntityViewUpdater.AutoFindMapData = true |
Disable you don't intend to use MapData component.
| QuantumSnapshotInterpolationTimer Quantum.QuantumEntityViewUpdater.SnapshotInterpolation = new QuantumSnapshotInterpolationTimer() |
Configuration of the snapshot interpolation mode of EntityViews.
| QuantumMapData Quantum.QuantumEntityViewUpdater.MapData => _mapData |
Provides access to MapData when deriving from this class for example.
|
protected |
Provides access to the active entities.
|
protected |
Privates access to the entities that should be removed.
|
protected |
Provides access to the active views.
|
protected |
Returns true when the entities are marked to teleport next update. Set by TeleportAllEntities.
| QuantumGame Quantum.QuantumEntityViewUpdater.ObservedGame => _observedGame |
Returns the currently observed game.
|
getset |
Get or set the EntityViewPool. If not set, the EntityViewUpdater will use the first found pool in the hierarchy.
|
getset |
Get or set the EntityViewCulling. If not set, the EntityViewUpdater will use the first found culling class in the hierarchy.
|
get |
Access all view contexts that could be loaded in the scene as children of the EntityViewUpdater.