Back in to this topic again.
I recompile scripts like this,
Save Stuff (Events, Object properties, etc..)
DiscardModule
reRead Changed files
CreateModule
Load Stuff
this method partially works but has some real drawbacks.
- everytime new classes/ events introduced i go back to save/load methods
- forces script writer to have strict rules if recompile to be done
this is very tedious as you imagine. it kills my motivation to add new events and c++ objects to scripts.
i know angelscript is not designed to be recompiled at runtime,
but i should still ask since i am very inexperienced about the engine. might be missing something.
is it somehow possible to not call destructors and disable destruction of globals and refcounted objects upon module recompilation?
thanks.
Recompile script without calling destructors
There is no way to avoid the destruction of the objects during the recompilation. You can serialize the objects so they can be reconstructed after the compilation, but the original objects will be destroyed.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
There is no way to avoid the destruction of the objects during the recompilation. You can serialize the objects so they can be reconstructed after the compilation, but the original objects will be destroyed.
ok.
is it possible to compile a dummy module and copy its type definitions/functions to the actual module one by one, update if already exists?
Unfortunately not.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
then i will close the chapter of "dynamic compilation".
man gotta know his limits.
thank you.
man gotta know his limits.
thank you.
It would be a useful feature, and if I can figure out a working solution it is definitely something I would like to add.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement