Topic was automatically imported from the old Question2Answer platform.
Asked By
Randy Yang
Old Version
Published before Godot 3 was released.
I want to know if there is a way to check if an object is an instance of another object. Say I have a created a class called Cell.gd and in another gdscript I want to do something like this:
var Cell = preload('Cell.gd')
var cell = Cell.new()
if (cell.instanceof(Cell)):
return true
I know there is a typeof but it can only check against the predefined Enums and not specfic like how I described above.