• Register
Post news RSS Text 2D & 3D with Visual Editor 2.3.0

In the next Wave 2.3.0 we are introducing a useful set of components that will help to create your games. Some of them are the TextComponent, TextRenderer2D and TextRenderer3D components, allowing the user to create 2D and 3D labels in your scene directly from our Visual Editor. This article will explain how to create them.

Posted by on

In the next Wave 2.3.0 we are introducing a useful set of components that will help to create your games. Some of them are the TextComponent, TextRenderer2D and TextRenderer3D components, allowing the user to create 2D and 3D labels in your scene directly from our Visual Editor. This article will explain how to create them.

TextComponent

The TextComponent component inherits from BaseModel class and contains all the necessary properties for its correct display, which are the next ones:

  • Text: The label text
  • FontPath: Te SpriteFont asset for the text.
  • TextAlignment: The text alignment (Left by default)
  • Foreground: The label text color.
  • LayerType: The layer of the text (Alpha by default).
  • LineSpacing: The additional space among text lines.
  • TextScale: The text scale. Useful when you are dealing with big fonts and don't want to change its Transform3D.
  • TextWrapping: If the label must be wrapped in different lines.
  • Width: If TextWrapping is true, it's the total width of the component.
  • Origin: The origin Vector2 of the entire text component. Similar to Transform2D origin.

TextRenderer3D and 2D

TextRenderer3D and TextRenderer2D are two components which inherit from Drawable and Drawable2D respectively.

They draw the TextComponent information in your 3D or 2D camera in the desired layer.

Create with Wave Visual Editor

Creating text3D and 2D entities now is really easy. You just have to:

Text 3D

  • Click on the button on the Entities Hierarchy panel and click on Text3D
  • In the Entity Details panel, find TextComponent and it's FontPath property. Select your desired font.
  • On its Text property set its text.

Text 2D

  • Click on the button on the Entities Hierarchy panel and click on Text3D
  • In the Entity Details panel, find TextComponent and it's FontPath property. Select your desired font.
  • On its Text property set its text.

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.