- Edited
I have a GDExtension node which I am now ready to write landmass generation in GDScript to be attached. Is there anyway I could have the node switch which script is attached?
I have a GDExtension node which I am now ready to write landmass generation in GDScript to be attached. Is there anyway I could have the node switch which script is attached?
Lousifr You can use Object::set_script()
Lousifr In addition to what @xyz already said, the manual shows how to do that:
https://docs.godotengine.org/en/stable/tutorials/best_practices/scenes_versus_scripts.html#performance-of-script-vs-packedscene