You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, FTW supports creating regular classes and singletons using the class and singleton commands. I propose adding another command tool.
Currently, ftw overwrites the lib.rs file and the init function. This means that custom handle.add_class<> calls are removed from the file. In order to register a tool script with godot-rust, you have to do something like
but this will be overwritten if you ever run a command like ftw class again.
I tried implementing this command, but I got stuck because the current implementation reads the source-dir and looks for [NativeClass] using a regex. I couldn't think of a good approach for tool scripts so I decided to post an issue here and get some feedback from you before I proceed. For example, I thought of adding some custom attribute, but this would require users to import a crate into their project which feels messy and against the current approach. I also thought of making the user add a comment but this approach is not always popular.
Another option, instead of implementing this tool command, is some workaround that allows you to call some custom code from the lib.rs file.
The text was updated successfully, but these errors were encountered:
Currently, FTW supports creating regular classes and singletons using the
class
andsingleton
commands. I propose adding another commandtool
.Currently, ftw overwrites the lib.rs file and the
init
function. This means that customhandle.add_class<>
calls are removed from the file. In order to register a tool script with godot-rust, you have to do something likebut this will be overwritten if you ever run a command like
ftw class
again.I tried implementing this command, but I got stuck because the current implementation reads the source-dir and looks for [NativeClass] using a regex. I couldn't think of a good approach for tool scripts so I decided to post an issue here and get some feedback from you before I proceed. For example, I thought of adding some custom attribute, but this would require users to import a crate into their project which feels messy and against the current approach. I also thought of making the user add a comment but this approach is not always popular.
Another option, instead of implementing this tool command, is some workaround that allows you to call some custom code from the lib.rs file.
The text was updated successfully, but these errors were encountered: