RootUtils

Class & Script Gen

Client-Side Secure

Auto-generate C# (Unity) and GDScript (Godot) classes with smart type inference. Save time on.

Generated Code
Options:

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 MonoBehaviour classes with [SerializeField] attributes and `Start()`/`Update()` lifecycle awareness.
  • Godot (GDScript)Creates GDScript 2.0 compatible classes with @export annotations and snake_case formatting.
  • TypeScriptOutputs clean Interfaces or Classes with strict typing, perfect for React props or API DTOs.
  • Python & JavaSupports Python @dataclass structures 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, or can (e.g., "isDead") become bool.
  • Vectors: Variables named pos, dir, or velocity become Vector3 (in Unity/Godot).
  • Strings: Names like title, desc, or name become string.
  • Lists: Plural names like items or enemies become List<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

  1. 1
    Enter your VariablesType or paste your variable names into the main text area. You can just type health, mana, isAlive—one per line.
  2. 2
    Select Language & OptionsChoose your target engine (e.g., Unity, TypeScript) and toggle features like Singleton or Constructor based on your needs.
  3. 3
    Copy 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.