Occasionally Godot will fail to register classes created in external editors to the class cache. When this happens, the recommendation on the Github site was to delete the .godot folder to regenerate global_script_class_cache.cfg. However, when doing this, global_script_class_cache.cfg becomes unable to regenerate at all, remaining empty and making it so that the project can detect no scripts at all.
As it stands, my project has been irreparably destroyed by this issue. How do I force global_script_class_cache.cfg to regenerate properly?
I did indeed. I was able to force it to regenerate the class cache by deleting the .godot file and rebuilding, but I’m still unable to get it to detect my custom resource. No matter what I do, the resource does not appear in the editor, and will never show up in the class cache no matter how many times it’s rebuilt.
Back up global_script_class_cache.cfg, then open it in any text editor like Notepad. Check if your resource is there. If it is, check if everything is correct (base class name, class name, path) and fix any incorrect names etc. If it is not there, you can add it manually by following the format of other entries:
You can’t actually do this because it regenerates the file each time, so it will always restore itself to the version before you edited it. I had to start my project over from scratch