UGTK cat mascotUGTKengine within an engine Request access

UGTK / Toolkit / Ui Module / Message System Completed

Ui Module — UGTK

Message System

Summary

A chat/messaging UI system: Mn_ChatManager (a singleton) loads conversations and adds "my" (right) and "friend" (left) message bubbles, while Mn_ChatBuilder builds each bubble from pooled prefabs, splitting long text across single/double/multi cloud sections. A Server/ layer talks to a PHP backend for login/register, fetching conversations, new-message polling and read receipts.


Content


Modules Dependencies

Carried inside the prefabs. These modules are not referenced by the assembly definition - the components are simply already attached to the prefabs this module ships. Remove one of them from the project and the prefab keeps its layout and loses that behaviour, with nothing in the console to say so.

Module Component, and the prefab carrying it
UIModule/TextUpdaterSystem Mn_TextUpdater (in Time), Mn_TextUpdater (in User)

Only in the demo scene. The Debug scene of this module also uses GameplaySystems/LoadingSystem, Minigames/TrisSystem, UtilitySystems/ActivationSystem. Nothing in the runtime code needs them: import this module on its own and it works, but the demo scene opens with missing scripts where those components were.


Setup

Drop the User prefab into the scene — the chat prefabs live under Prefabs/Messages and Prefabs/Times:


How To Use


Testing Scene

Open MessageScene in the module's Debug/ folder.

What to do, in order:

  1. Show a message and let it dismiss itself.
  2. Show a second one while the first is still visible.
  3. Show one with a very long text.
  4. Show several in rapid succession.

Step 2 decides the whole design: messages either queue or replace each other, and the wrong one for your game means a player either misses something important or waits through a backlog.

MessageScene opens on a door, not on a chat: Login or Subscription first, and the conversation only exists on the other side of it. The recording is that screen taking a nickname and a password and being sent.

The endpoint the demo ships with answers 404, so nobody gets past this login until the credential operations point at your own server. What the demo does show is what a player sees when that happens:

The banner is OnLoginFailed, and it took two fixes to arrive. Mn_UserLogin only raised that event for a server that answered and said no - a request that never reached the server at all logged and raised nothing, which is exactly the case here. And the LoginFailed object in the scene still referenced Mn_OpenSceneButton, renamed to Mn_OpenScene some time ago: four components in this scene were "missing script", so even a raised event had nothing to run.

Both are worth knowing when you wire your own: the transport failure and the rejection are different events in most APIs, and only one of them is the one you test with.


Technical Info


© 2026 Marcello De Bonis. All rights reserved

Real dependenciesOpen in the map →

Measured from the repository: code references (asmdef) plus prefab and asset GUIDs. Importing this module alone brings in 12 modules in total.