• Advertisement
Sign in to follow this  

Dynamically load scripts on-demand

This topic is 1565 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to write the scripting system for my engine, and I would like to be able to load scripts on-demand. However, the only way I know of to load scripts is to use the module's AddScriptSection method and then calling the module's Build method after that. Is there any way to just build one script and add it to the module?

Share this post


Link to post
Share on other sites
Advertisement

It's not (yet) possible to incrementally add scripts sections to an existing module without recompiling the whole thing.

 

However, instead of adding the scripts to an existing module, why not design your engine to use different modules for different scripts? You can then load and compile the modules on-demand like you want. Individual modules can also be discarded without affecting the other ones.

 

You can study the game sample in the SDK for an idea on how this might work.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement