Open git2013vb opened 4 years ago
I'm guessing this is known:
// TODO Use script templates. Right now, this code won't add the 'tool' annotation to other languages.
// TODO Better support script languages with named classes (has_named_classes).
// FIXME: It's hacky to have hardcoded access to the GDScript module here.
// The editor code should not have to know what languages are enabled.
Basically, for GDScript the plugin code is generated by hand ad hoc, and for everything else whatever is default is used. This example of yours is straight from modules\mono\csharp_script.cpp.
I'm wondering where that example in page came from because I read "Thankfully, the dialog generates these callbacks for you. Your script should look something like this:"
@git2013vb The example code was probably adapted from the GDScript example without checking. Or it was made ahead of any improvement to plugin.cs
generation that never came.
It seems to be a good opportunity for a first PR, btw. Needs some consensus on how to implement a plugin template into base classes, but otherwise rather simple task.
Related: https://github.com/godotengine/godot/issues/28799. Right now the template is hard-coded and there is only one.
Godot version: 3.2.1 stable mono OS/device including version: Debian 10 Issue description: Following the instruction from documentation here Godot does not create the correct file:
Expected:
Steps to reproduce: follow the instructions on the page Minimal reproduction project: NA