Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | aaqib7 | |
Old Version | Published before Godot 3 was released. |
Hi,
The engine crashes when I inherit a subclass from another file. It works fine if I inherit a subclass from the same file.
For example:
Class.gd File
class Class1:
extends "res://Test.gd".Class2
func _init():
pass
Test.gd
class Class2:
func _init():
print("Class 2 initialization!")
The engine crashes upon startup, sometimes with the error ‘Could not determine inheritance’ or it will crash without no error.
Please, could anyone give me an example of how to inherit a subclass/class from another file because I’m unable to do this. Currently, I’m only able to inherit a class from the same file but not from a different file.
Thanks