archetypekeyword in your schema, then list the LODs in ascending order. Notice that LOD 0 does not need a distance, since it always starts at 0. Here's an example of a simple Archetype:
WorldPosition. Any client with a distance of 10 – 200 will get
WorldOrientation, and anything closer than that will get the full Entity.
ArchetypeComponent– this component has a field index that keeps track of which one of the Archetypes in your schema that is being used. If you add the
ArchetypeComponentyourself you have to use the static constants in the
Coherence.Generated.Archetypeto set the index. These all have the name "Archetype name" + "Index", e.g.
EnemyIndexin the example above.
EnemyArchetypein the example above. This component can be used to create optimized ForEach queries for a specific Archetype.
LastObservedLod– this component holds the current LOD for the Entity. This can be used to detect when the Entity changes LOD, if that's something you want to react to. Note that this component is not networked, since the exact LOD for an Entity is unique for each Client.
Archetypeclass to instantiate the Archetype in a usable state. These are named "Instantiate" + "Archetype name", e.g.
InstantiateEnemyin the example above.
valuein this case.) Any field that is not overridden will use the settings of the LOD above, or the original component if at LOD 0.