Is this a bug? Errors with autoloads in Godot 4
Asked Answered
T

4

0

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

Tunicle answered 12/4, 2023 at 3:20 Comment(0)
T
0

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.

Tunicle answered 12/4, 2023 at 4:0 Comment(0)
B
0

Could be a bug. Best to report it on Github (check that it's not a known issue first).

Byrdie answered 12/4, 2023 at 5:4 Comment(0)
G
0

I'm facing the same problem too, v. 4.2.1

Gottwald answered 29/2 at 10:42 Comment(0)
N
0

Gottwald delete the .godot subfolder in your project folder and reload the project. Don't forget to backup beforehand, just in case.

Nashua answered 29/2 at 11:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.