File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -73,8 +73,9 @@ static func lookup(name: String) -> PandoraPropertyType:
7373
7474 if ResourceLoader .exists (type_path ):
7575 var ScriptType = load (type_path )
76- if ScriptType != null and ScriptType .has_source_code ():
77- return ScriptType .new ()
76+ if ScriptType != null :
77+ if ScriptType .has_source_code () or ScriptType .can_instantiate ():
78+ return ScriptType .new ()
7879
7980 return UndefinedType .new ()
8081
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ static func create_entity_from_script(
3939
4040static func _get_entity_class (path : String ) -> GDScript :
4141 var EntityClass = load (path )
42- if EntityClass == null :
42+ if EntityClass == null or not EntityClass . can_instantiate () :
4343 push_warning ("Unable to find " + path + " - defaulting to PandoraEntity instead." )
4444 EntityClass = PandoraEntityScript
4545 return EntityClass
You can’t perform that action at this time.
0 commit comments