(From me in the future: In writing this, I found a workaround that assigns ItemInfoResource during runtime, so this isn't blocking me. But I just wanted to understand the reasoning behind this to understand the engine a little better.)
I have a scene that is an "Item". It's meant to be a generic "base" item. In the Item script, I have a reference to a ItemInfoResource that I can then use to give it stats, a sprite, and most importantly a PackedScene of the particular "Item" so I can instantiate these Items in my world.
However, once I assign the my "Item" scene to the PackedScene export variable, then it gives me the error:
Recursion detected, unable to assign resource to property
So to recap:
- I give my scene a ItemInfoResource
- I give my ItemInfoResource a reference to the Item scene
- I get a recursion error.
But to me this isn't recursion, because I'm merely giving it a reference. Are these somehow instantiated because it's an @export variable? Or is it Godot just trying to be cautious and stopping a case that isn't actually a problem?