Class CoherenceLiveQuery
The live query is a component that filters what entities are replicated to the client based on their position in the world.
Use it by moving its transform to the center of interest and adjusting the radius to a suitable value. Using a small query is a great optimization if the world / room contains a lot of entities.
If set, the CoherenceBridgeResolver<T> event is used to decide
which CoherenceBridge
to use (in case there are multiple.)
[NonBindable]
public sealed class CoherenceLiveQuery : CoherenceQuery
- Inheritance
-
CoherenceLiveQuery
- Inherited Members
Constructors
CoherenceLiveQuery()
public CoherenceLiveQuery()
Fields
radius
Despite the name of this variable, the live query is a box, not a sphere.
The radius
is the length from the center of the box to each of its sides
in world space (i.e. half the length of its side.)
A radius of 0 means infinite radius, so all entities in the world / room are replicated to the client.
public float radius
Field Value
Methods
CreateQuery()
protected override void CreateQuery()
Initialize()
protected override void Initialize()
NeedsUpdate()
protected override bool NeedsUpdate()
Returns
OnFloatingOriginShifted(FloatingOriginShiftArgs)
protected override void OnFloatingOriginShifted(FloatingOriginShiftArgs _)
Parameters
UpdateQuery(bool)
protected override void UpdateQuery(bool queryActive = true)
Parameters
queryActive
bool