Game plays from launcher however in editor tres shows as nil and can't run from editor

Godot Version

v4.2.2.stable.mono.offcial [15073afe3]

Question

I have been working in the engine for a while and suddenly all of my custom resources stored as .tres files are displayed as nil within the editor. I can still run the game via the launcher however if I open it to edit they show as nil in the editor and hitting run in there crashes wherever a non nil resource is expected- also after viewing a .tres in the editor and running it the file itself is overwritten with nil.

Found the solution on the godot github here thanks to KarmyDev:

It appears I found the issue. Its kind of my fault and Microsoft’s, basically replaces every constant value with whatever its inside this Property. Hence why adding any own constant breaks Godot - because it removes anything else thats already set.

In order to add any own constants, you have to add $(DefineConstants); before your constant inside Property.

I think the git covers this but it was not just effecting my custom resources but all exported items in the editor

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.