Earewien / godot-traits

Traits made easy in Godot 4
MIT License
82 stars 5 forks source link

Error when opening a project with no traits. #11

Open polepage opened 1 month ago

polepage commented 1 month ago

Godot Traits v0.5.0 Godot v4.2.2

Issue: When opening a project that already have the Godot Traits addon activated, if there are no traits defined in the project the following error appears:

scene/resources/resource_format_text.cpp:284 - res://addons/godot-traits/core/container/gtraits_container.tscn:6 - Parse Error: Failed loading resource: res://addons/godot-traits/core/container/gtraits_container.tscn. Make sure resources have been imported by opening the project in the editor at least once. Another resource is loaded from path 'res://addons/godot-traits/core/container/gtraits_container.tscn' (possible cyclic resource inclusion).

Because of the possible cyclic resource inclusion, the scene gtraits_container.tscn appears to be corrupted and cannot be opened.

The issue happened both in an existing project and in a completely new and empty project with just the addon setup.

Workaround: Creating a trait will this error.

polepage commented 1 month ago

Obviously the issue is minor because it can be solved by using the addon, however it does look a bit bad if it happens, I almost did not try to use the addon because I tought it was broken.