character.gd referenced CharacterData.State as a compile-time constant dict, causing export to fail when character.gd was compiled before character_data.gd (alphabetical order). The preload forces character_data.gd to be compiled first. Changing SubResource type to "Resource" removes the ClassDB lookup for the custom class name during scene export, relying on the explicit script reference instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>