Hi,
Is there a way to easily add scripted methods to classes that are registered on the C++ class? Typically I would need to define a script class in C++, which has some method implementations written in angelscript (not C++). Something like:
int r = engine->RegisterObjectType("MyClass", 0, asOBJ_REF|asOBJ_NOCOUNT); assert( r >= 0 );
r = engine->RegisterObjectMethod("MyClass", "int method()", "return this.value;"); assert( r >= 0 );
I know it is not possible to do this directly, but is there a trick to do this already?
In fact,what would be nice is to be able to compile object methods just the same way you can already compile a function using CompileFunction().