I'm trying to figure out a way to construct script defined classes using C++ and store them for later use (mostly just calling methods)
In my script I have the code:
Now I want to be able to do this in C++
auto t = scriptEngine->eval("test_obj()"); // The Constructor
Is this a valid way to store this class instance within C++? I don't want to liter the chaiscript environment with a bunch of instances of the same class, so I want to avoid eval entirely after creating an instance.
How can I get attributes and call methods from this class, if I can at all. If not, I'm not sure how I can organize this for my game engine.