Class & Script Gen
Client-Side SecureAuto-generate C# (Unity) and GDScript (Godot) classes with smart type inference. Save time on.
Is this tool broken?
Let us know if you found a bug or have a feature request.
Free Online Class & Boilerplate Code Generator
The RootUtils Class Generator is a developer utility designed to eliminate the repetitive task of writing boilerplate code. Whether you are a Game Developer needing a new MonoBehaviour, a Web Developer defining a TypeScript interface, or a Backend Engineer creating a Java POJO, this tool writes the code for you instantly.
It features a Smart Inference Engine that analyzes your variable names (e.g., "health", "isActive", "position") and automatically assigns the correct data types (`float`, `bool`, `Vector3`), saving you from typing them manually.
Supported Languages
- Unity (C#)Generates
MonoBehaviourclasses with[SerializeField]attributes and `Start()`/`Update()` lifecycle awareness. - Godot (GDScript)Creates GDScript 2.0 compatible classes with
@exportannotations and snake_case formatting. - TypeScriptOutputs clean Interfaces or Classes with strict typing, perfect for React props or API DTOs.
- Python & JavaSupports Python
@dataclassstructures and standard Java Beans with getters/setters.
How the Smart Engine Works
You don't need to define types explicitly. Our engine detects patterns in your variable names:
- Booleans: Variables starting with
is,has, orcan(e.g., "isDead") becomebool. - Vectors: Variables named
pos,dir, orvelocitybecomeVector3(in Unity/Godot). - Strings: Names like
title,desc, ornamebecomestring. - Lists: Plural names like
itemsorenemiesbecomeList<T>or arrays.
Tip: You can always override the auto-detection by typing variable:type (e.g., score:long).
Generator Options Explained
Serializable
Prepares your variables for inspection tools.
Example: In Unity, it adds [SerializeField] so variables appear in the Inspector window. In Godot, it adds @export.
Singleton
Implements the Singleton Design Pattern automatically.
Example: Generates a public static Instance and ensures only one version of the class exists. Essential for Game Managers.
Constructor
Generates an initialization method that accepts arguments for all your variables.
Example: public Player(float health, float speed) { ... }
How to use this tool
- 1Enter your VariablesType or paste your variable names into the main text area. You can just type
health,mana,isAlive—one per line. - 2Select Language & OptionsChoose your target engine (e.g., Unity, TypeScript) and toggle features like Singleton or Constructor based on your needs.
- 3Copy or DownloadThe code updates in real-time. Click Copy Code to paste it into your IDE, or Save File to download the ready-to-use script.
You might also like
Draw polygon colliders on sprites and export to Unity/Godot. Essential for 2D game devs.
Free online Keyboard Test. Check for ghosting, key rollover, and broken keys on your mechanical or laptop keyboard. Instant visual feedback.
Free online Reaction Time Test. Measure your visual reflexes and click speed. Challenge yourself and improve your reaction time.