Table of Contents

Class EntityTextProcessor

Namespace
Stride.CommunityToolkit.Rendering.Text
Assembly
Stride.CommunityToolkit.dll

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

IReadOnlyList<EntityTextRenderData>

Methods

Draw(RenderContext)

public override void Draw(RenderContext context)

Parameters

context RenderContext

GenerateComponentData(Entity, EntityTextComponent)

protected override EntityTextRenderData GenerateComponentData(Entity entity, EntityTextComponent component)

Parameters

entity Entity
component EntityTextComponent

Returns

EntityTextRenderData

IsAssociatedDataValid(Entity, EntityTextComponent, EntityTextRenderData)

protected override bool IsAssociatedDataValid(Entity entity, EntityTextComponent component, EntityTextRenderData associatedData)

Parameters

entity Entity
component EntityTextComponent
associatedData EntityTextRenderData

Returns

bool

OnEntityComponentAdding(Entity, EntityTextComponent, EntityTextRenderData)

protected override void OnEntityComponentAdding(Entity entity, EntityTextComponent component, EntityTextRenderData data)

Parameters

entity Entity
component EntityTextComponent
data EntityTextRenderData

OnEntityComponentRemoved(Entity, EntityTextComponent, EntityTextRenderData)

protected override void OnEntityComponentRemoved(Entity entity, EntityTextComponent component, EntityTextRenderData data)

Parameters

entity Entity
component EntityTextComponent
data EntityTextRenderData