I have a script that is autoloaded called "state". The script extends a Node. It just has some basic funcs, nothing relevant. The bug I am reporting is, I never wrote "class_name State" on this script before I made it a singleton. When I go to add "class_name State" I get the error 'class State hides an autoload singleton". Any known workarounds? If I go to delete the singleton, it still thinks it is autoloaded. I've read some bits here and there about needing to clean Godot's cache, doesn't seem like a great solution though
Is this a bug? Errors with autoloads in Godot 4
Asked Answered
I checked the project folder code manually, and the autoload is not there. Its no longer in the autoload section. The engine is still reading it as present. Need a solution.
Could be a bug. Best to report it on Github (check that it's not a known issue first).
I'm facing the same problem too, v. 4.2.1
Gottwald delete the .godot subfolder in your project folder and reload the project. Don't forget to backup beforehand, just in case.
© 2022 - 2024 — McMap. All rights reserved.