Create C# Script
unity_create_scriptCreate Unity 6 C# scripts from templates, refresh AssetDatabase, and let Unity compile them. Specify path, template, class name, and overwrite as needed.
Instructions
Create a script from a Unity 6 template. Refreshes AssetDatabase so Unity compiles it.
Args: path ('Assets/Scripts/PlayerController.cs'), template monobehaviour|scriptableobject|editor|empty, class_name (default = file name; must match file name), overwrite (default false). After creating, wait for compilation (console check) before attaching.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Project-relative script path, e.g. 'Assets/Scripts/PlayerController.cs' | |
| template | No | Unity 6 template to generate from | monobehaviour |
| overwrite | No | Overwrite if the file already exists (default false) | |
| class_name | No | Class name (defaults to file name without extension; must match it) |