Hello,
So I've been successfully using AngelScript in my personal project, but I ran into an issue which was unexpected. I have the following setup:
[module A]
shared interface IInterface
{
}
shared class SBaseClass
{
}
[module B]
shared class SClass : SBaseClass
{
IInterface@ Prop
{
set
{
...
}
}
}
[module C]
shared class SomeClass : IInterface
{
}
Now in my code I have a handle to an object of type SClass and I request the function ID of the Prop setter like this:
const auto pType = hObject->GetObjectType();
if (pType)
{
const auto pFunc = pType->GetMethodByDecl("void set_Prop(SomeClass@)");
}
Now this fails to find the method declaration, because it can't find the SomeClass type. That's because the script engine takes the module of the first method to start looking for the type (module A in this case) and it seems the modules only look in types directly registered with the engine or that were parsed inside the module itself. I would've expected shared types to be checked here too.
I can work around this, but was wondering if this was intended behaviour, an oversight or if I'm simply missing something. Thanks for any and all help!