AppleyAppley Docs
Docs/UI

UI Text

Display text to the player.

5 min read Beginner Updated 2026-07-01 v2.0 ~15 min to complete

Introduction

Display text to the player. This page provides a complete guide to ui text in Appley, covering everything from setup to advanced techniques.

UI is a core area of Appley. Understanding ui text will help you build better games and use the platform more effectively. This documentation is designed for beginner level users.

Requirements

Before working with ui text, ensure you have the following:

  • An Appley project
  • UI assets (buttons, icons, fonts)
  • Understanding of screen layout and anchoring
  • Basic knowledge of responsive design

Estimated Completion Time

This guide takes approximately 15 minutes to complete. The estimated reading time is 5 minutes. Difficulty level: Beginner.

Step-by-Step Guide

Follow these steps to work with ui text in your Appley project:

1

Open the UI Designer

Switch to the UI tab in Creator Studio to access the UI design tools.

2

Create UI element

Add a ui text element to the canvas from the UI palette.

3

Configure properties

Set text, color, size, and interaction properties in the inspector.

4

Anchor and layout

Position the element using anchors and layout groups for responsive design.

5

Script interactions

Use the UI API to update and respond to the ui text element during gameplay.

FluxScript Example

Below is an Appley Scripting (Flux Scripting) code example demonstrating ui text:

UI Text — Appley Scripting
// UI — UI Text
on start {
  ui.show("hud")
  ui.setBar("healthBar", 1.0)
  ui.setText("scoreLabel", "Score: 0")
}

on update(dt) {
  healthPercent = player.health / player.maxHealth
  ui.setBar("healthBar", healthPercent)
  ui.setText("scoreLabel", "Score: " + score)
  if player.tookDamage {
    ui.flash("damage", 0.3)
  }
}

on event("gameOver") {
  ui.show("gameOverPanel")
  ui.setText("finalScore", "Final: " + score)
}

Node Script Example

The same logic can be implemented using Node Scripting. Here is the equivalent node graph:

UI Text — Node Graph
[On Update] ──► [Get Health %] ──► [Set Bar: healthBar]
            ──► [Get Score] ──► [Set Text: scoreLabel]
            ──► [Branch: tookDamage] ──► [Flash: damage]

[On Event "gameOver"] ──► [Show: gameOverPanel]

Interchangeable Systems

FluxScript and Node Scripting compile to the same runtime. You can mix both in a single project — use whichever is best for each task.

Common Mistakes

Avoid these frequent mistakes when working with ui text:

Not anchoring UI elements to screen edges

Use anchors so UI adapts to different screen sizes.

Hardcoding pixel positions

Use relative positioning and layout groups for responsive UI.

Creating too many UI panels at once

Show/hide panels as needed; dont render hidden UI.

Not handling safe areas on mobile

Use safe-area insets to avoid notch and home indicator overlap.

Troubleshooting

If you encounter issues with ui text, try these solutions:

UI elements are off-screen on mobile
Use safe-area insets. Anchor elements to screen edges with offsets.
UI buttons dont respond to touch
Ensure raycast target is enabled. Check that the canvas has a raycaster.
Text is blurry on high-DPI screens
Enable high-DPI rendering. Use SDF fonts or increase font size.
UI overlaps in landscape mode
Use responsive layout groups. Test in both orientations.

Performance Tips

Optimize your use of ui text with these performance tips:

  • Use layout groups (horizontal, vertical, grid) for auto-arranging UI elements.
  • Anchor UI to screen edges with safe-area offsets for mobile compatibility.
  • Pool UI elements (tooltips, damage numbers) instead of creating/destroying per event.
  • Use SDF (Signed Distance Field) fonts for crisp text at any size.

Explore these related documentation pages:

Example Project

Download a complete example project demonstrating ui text: