Hi everyone,
I just started using angelscript and got quiet used to it. Now I have a question regarding class casting.
Consider this:
// C++
class CInstance
{
setTemplate(CTemplate* pTemplate);
};
class CTemplate
{
void render();
}
class CSphere : public CTemplate
{
void render();
}
I have registered all of these classes in the AngelScriptEngine, except the relation CSphere:CTemplate. Now if I try to do, in angelscript code, something like this:
instance inst;
sphere sp;
inst.setTemplate(sp);
I get the error that it cannot be casted ( in the setTemplate call ).
Is there some sort of cast operator in Angelscript ?
Thx in advance,
Marcus