UGTK cat mascotUGTKengine within an engine Request access

UGTK / Toolkit / Utility Systems / Code Wizard Completed

Utility Systems — UGTK

Code Wizard

Summary

An editor window (UGTK > Code Wizard) that generates C# scripts from configurable templates — raw class, MonoBehaviour, UGTK Singleton, and SO dictionary/simple/randomic databases — defining types and members visually, then tracks, regenerates (region-patched) and deletes the generated files.


Content


Modules Dependencies

This module is self-contained editor tooling. Some built-in templates emit code that references UGTK systems (the Singleton pattern and the ScriptableObject dictionary/database systems), so the generated scripts assume those UGTK systems are present in the project. The wizard itself has no hard runtime UGTK dependency.


Setup

This is an editor-only tool (#if UNITY_EDITOR); no scene setup is required. Open it via UGTK > Code Wizard. Its configuration is persisted in a CWProjectAsset ScriptableObject, and generated scripts go by default under Assets/UGTK/Generated/CodeWizard (configurable in the Settings tab).


How To Use

The window has three tabs:


Testing Scene

This is an editor tool: there is nothing to play. Open UGTK > Code Wizard and stay on the Create tab, where the Type Builder puts a whole type together field by field.

What to do, in order:

  1. Give the type a name and press + Field, + Property, + Method: each one adds a row with its own access modifier, type and options - a property shows its get and set ticks.
  2. Press Generate .cs and check the file lands in the output folder shown top right.
  3. Generate a type from each template.
  4. Add a member to a generated type and regenerate it.
  5. Write your own code outside the AUTO region and regenerate again.
  6. Adopt a hand-written script, then try to delete a file that has no AUTO region.

Step 5 is the guarantee the whole tool rests on: only the text between the markers is rewritten, so your code survives. Step 6 is the other side — the deleter refuses files it did not generate, which is what stops it eating something you wrote.


Technical Info


© 2026 Marcello De Bonis. All rights reserved

Real dependenciesOpen in the map →

Depends on 3

Used by 0

  • No other module depends on it.

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