Original Post
Hi,
I have a usage scenario for AngelScript and would like to ask if that is possible at all and what the best way to do it is:
I believe I have the easy steps figured out (but am open to suggestions):
- I register a set of interfaces with the scripting engine so the scripts can interact with my systems
- The scripts are going to be script classes that implement a set of event methods set by a specific interface (like onUpdate or onSetup)
- Although many different instances of those script classes exist, only one of the event methods run at a time.
- The system loads presets that reference script code. I would ideally have this script code in binary form when I load it.
The hard part would be:
- During developement of the presets, I would ideally be able to unload the script class definition for one preset and reload it with the updated code.
The main problem is that there will most likely be 300-400 of those presets active at one time, and only a hand full share the same script class so only those would need reloading. I traced AddScriptSection for a bit and found that although it uses a string table and index for the naming, the index itself is not really used and sections with the same name would be added more than once. I also found no way to unload a section, either.
Thanks for helping!
I have a usage scenario for AngelScript and would like to ask if that is possible at all and what the best way to do it is:
I believe I have the easy steps figured out (but am open to suggestions):
- I register a set of interfaces with the scripting engine so the scripts can interact with my systems
- The scripts are going to be script classes that implement a set of event methods set by a specific interface (like onUpdate or onSetup)
- Although many different instances of those script classes exist, only one of the event methods run at a time.
- The system loads presets that reference script code. I would ideally have this script code in binary form when I load it.
The hard part would be:
- During developement of the presets, I would ideally be able to unload the script class definition for one preset and reload it with the updated code.
The main problem is that there will most likely be 300-400 of those presets active at one time, and only a hand full share the same script class so only those would need reloading. I traced AddScriptSection for a bit and found that although it uses a string table and index for the naming, the index itself is not really used and sections with the same name would be added more than once. I also found no way to unload a section, either.
Thanks for helping!