Add support in GetScript to interface types

#290
This commit is contained in:
Wojtek Figat
2023-02-10 15:36:02 +01:00
parent 9b6ba67186
commit d58a77cc60
3 changed files with 39 additions and 10 deletions

View File

@@ -124,6 +124,15 @@ bool MClass::IsSubClassOf(const MonoClass* monoClass) const
}
#endif
bool MClass::HasInterface(const MClass* klass) const
{
#if USE_MONO
return klass && mono_class_is_assignable_from(klass->GetNative(), _monoClass) != 0;
#else
return false;
#endif
}
bool MClass::IsInstanceOfType(MObject* object) const
{
if (object == nullptr)