Skip to main content
1 of 3
Nicol Bolas
  • 26.1k
  • 3
  • 77
  • 104

It seems to me that you're probably going about implementing your script interface the wrong way.

If you're reloading scripts, that generally means some level of teardown and rebuilding of the mirror C++ objects that talk to them. For example, if you have a Lua script that runs the AI for an entity, there would be some C++ object that represents that AI. That object is responsible for communicating with the Lua script (so that external code is insulated from knowing that a Lua script is even involved).

That object needs to be destroyed and rebuilt with the newly loaded script.

Nicol Bolas
  • 26.1k
  • 3
  • 77
  • 104