I'm following this documentation on GDExtension, Is there is a way to automatically set a script as Singleton (Autoload) without having to manually set it in the editor GUI?
The aim is that if you have the necessary GDExtension files (e.g. gdexample.h, gdexample.cpp, etc)
they would automatically be set as an autoload without having to make any changes within the editor? i.e. simply open up the game engine and everything is ready to go
why is this needed?
writing this to avoid xy problem, I have a universal_sub_viewport.tscn
scene with @tool
mode as such:
and this creates a singleton within the editor every time I start it up, I'm trying to replicate this in GDExtension without having to go through the hassle of setting up anything within the editor GUI