Simple Godot 4 plugin template in C#.
If you want to use GDScript version of template go to Godot Plugin Template in GDScript.
- Create project in Godot 4.
- Create
res://addons
directory. - Open Terminal or CMD and
cd
into addons directory, for examplecd C:\godot-projects\my-project-1
. - Clone this repository:
git clone https://github.com/eweninja/godot-plugin-template-csharp
. - Rename directory as you want to.
- Change paths in main script file
GodotPluginTemplate.cs
.
Minimal requirement is to have two files in plugin folder:
- main script, for example
plugin.cs
- config file
plugin.cfg
In config file you have to specify the name, description, author, version and base script. In the plugin scripts you have to wrap class in:
#if TOOLS
...
#endif
and add [Tool]
keyword.