UGTK cat mascotUGTKengine within an engine Request access

UGTK / Toolkit / Gameplay Systems / Tris System Completed

Gameplay Systems — UGTK

Tris System

Summary

A Tic-Tac-Toe minigame framework with four game modes (Classic, Matriosca, Sliding, Ultimate), configurable 1v1 or 1-vs-AI matches, per-mode AI brains and a shared setup / endgame UI.


Content


Modules Dependencies

This module has no hard UGTK cross-module dependencies (it uses only its own UGTK.Minigames.TrisSystem namespace). It relies on Unity uGUI and TextMeshPro for its UI.

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/SceneSystem Mn_OpenScene (in EndingScreen)
UtilitySystems/ActivationSystem Mn_GameObjectActivation (in AndroidStartingScreen), Mn_GameObjectActivation (in DesktopStartingScreen)

Setup

Create SO_CharacterSign assets (UGTK/Tris/CharacterSign) with a sign sprite and opponent sign. Build a setup scene with Mn_GameStarter and the selector components, then create one game scene per mode with the matching Mn_*_GameManager and its board UI.


How To Use


Testing Scene

Open Tris_MainMenu in the module's Debug/ folder.

What to do, in order:

  1. Start from the menu and play a full classic match to a win.
  2. Play one to a draw, filling every square.
  3. Try to place a sign on a square that is already taken.
  4. Play the Matriosca, Sliding and Inception variants from their own scenes.

The interesting states of a board game are all at the end, and each takes a whole match to reach by hand — which is why the manager's inspector has a 3×3 grid that places a sign on any square directly. Leave Force place off while testing step 3: with the rules active, the illegal move has to be refused.

Start from Tris_MainMenu, choose a match type and a mode, press START, and play: pressing a square places the sign and passes the turn, which is what the recording shows.

If the squares do nothing, you have an older copy. The board's On Pressed Field event was wired to TryPlaceSign(int, bool), and a UnityEvent can only carry one serialisable argument - so the inspector showed the listener as missing and every press went nowhere. There is now a one-argument overload for the event to bind to, and the demo plays.


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 8 modules in total.