Class EntityTextProcessor
Keeps track of every EntityTextComponent in the scene for the text renderer to draw.
public class EntityTextProcessor : EntityProcessor<EntityTextComponent, EntityTextRenderData>
- Inheritance
-
EntityTextProcessor
- Inherited Members
Remarks
Registered automatically through the DefaultEntityComponentProcessor attribute on the
component, so nothing needs to add it by hand. It also makes sure an
EntityTextRenderer is on the scene's compositor, which is what draws the
components in Game Studio's scene editor and in a game that never called
AddEntityTextRenderer.
Components are tracked wherever they sit in the entity hierarchy, including on child entities.
Properties
Texts
Gets every text currently in the scene, in no particular order.
public IReadOnlyList<EntityTextRenderData> Texts { get; }
Property Value
Methods
Draw(RenderContext)
public override void Draw(RenderContext context)
Parameters
contextRenderContext
GenerateComponentData(Entity, EntityTextComponent)
protected override EntityTextRenderData GenerateComponentData(Entity entity, EntityTextComponent component)
Parameters
entityEntitycomponentEntityTextComponent
Returns
IsAssociatedDataValid(Entity, EntityTextComponent, EntityTextRenderData)
protected override bool IsAssociatedDataValid(Entity entity, EntityTextComponent component, EntityTextRenderData associatedData)
Parameters
entityEntitycomponentEntityTextComponentassociatedDataEntityTextRenderData
Returns
OnEntityComponentAdding(Entity, EntityTextComponent, EntityTextRenderData)
protected override void OnEntityComponentAdding(Entity entity, EntityTextComponent component, EntityTextRenderData data)
Parameters
entityEntitycomponentEntityTextComponentdataEntityTextRenderData
OnEntityComponentRemoved(Entity, EntityTextComponent, EntityTextRenderData)
protected override void OnEntityComponentRemoved(Entity entity, EntityTextComponent component, EntityTextRenderData data)
Parameters
entityEntitycomponentEntityTextComponentdataEntityTextRenderData