how to delete a null Autoload script?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Kalmier

I get two errors when I run my game

-load: Resource file not found: res://True.
start: Can't autoload: True

when I look in projects settings, under the Autoload tab, I have my PlayerData.gd, and there is this mysterious “size” file with a path of “True”. I did not add this, and I can’t delete it. it’s like a property got added as an Autoload script.

a side note, when I made the PlayerData.gd, it was from a PlayerData.tscn first, so there were two files in my Autoload folder. But it was me who made that folder and had to connect my script through project settings, so I don’t think that has anything to do with it, but wanted to mention it just in case.

(game runs perfectly fine otherwise)

:bust_in_silhouette: Reply From: jgodfrey

Hmmm… Sounds strange, and is potentially some sort of project management bug in Godot. A screenshot of what you’re seeing might be nice.

And, you can’t delete it because that line doesn’t have that option (the trash can), or it has the option but it doesn’t work, or ??

Anyway, if you can’t clean it up through the interface, you can probably do it manually, by hand-editing the project.godot file in the root of your project folder.

Note, while I’m relatively confident this is safe, I’d suggest you have a backup before hand editing the project file. Better yet, hopefully you’re using Git or some other form of SCM that makes this 100% safe. Also, know that I’m no expert here (so continue at your own risk) but if it were me, I’d try this…

  • Close Godot
  • Open the project.godot file in a text editor
  • Find the [autoload] section in the file
  • Find and remove the offending entry
  • Save the modified file
  • Restart Godot and see if the contents of the Autoload panel look correct

editing the project.godot file worked. This is what I had…

[autoload]

PlayerData="*res://source/Autoload/PlayerData.gd"
size/always_on_top=true

no idea how that got added… if it happens again, I’ll investigate further, but so far so good.

Thank you.

Kalmier | 2020-02-06 03:48