Archive 17/01/2023.

Is there exist method to compare class type in scripts?

codingmonkey

Is there exist method to compare class type?
I mean I need something similar
if (component is Drawable)
{
// todo something
}

but now I do this check like this with cast and if cast<> successful the result is not null

Component@ component = components[componentIndex]; Drawable@ drawable = cast<Drawable>(component); if (drawable !is null) { // todo something }