How can i put an instance of a sprite in a list in chaiscript like this:
global Vaxskivling = Sprite("/resources/textures/Vaxskivling.png");
var list = [Vaxskivling];
When doing this i receive the following error:
Error: "Can not find appropriate 'clone' or copy constructor for vector elements
i have added the class constructor and type:
chai->add(chaiscript::base_class<Renderable, Sprite>());
chai->add(chaiscript::user_type<Sprite>(), "Sprite");
I had a unique_ptr reference in my interface "Renderable" which Sprite implements. I changed to shared_ptr plus using this constructor:
chai.add(chaiscript::constructor<MyType (const MyType &)>(), "MyType");
my issue was resolved!