# Godot permanently caching outdated script file paths?

**URL:** <https://forum.godotengine.org/t/godot-permanently-caching-outdated-script-file-paths/101729>\
**Category:** Help\
**Tags:** godot-4, gdscript\
**Created:** [February 12, 2025, 5:00pm UTC](https://forum.godotengine.org/t/godot-permanently-caching-outdated-script-file-paths/101729 "2025-02-12T17:00:07Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blander](https://forum.godotengine.org/user_avatar/forum.godotengine.org/blander/32/43833_2.png) [@Blander](https://forum.godotengine.org/u/Blander)\
**Post date:** [February 12, 2025, 5:00pm UTC](https://forum.godotengine.org/t/godot-permanently-caching-outdated-script-file-paths/101729/1 "2025-02-12T17:00:07Z")

</div>

### Godot Version

4.3

### Question

I’ve been fiddling around with Godot a bit this week, and today I ran into a bunch of errors where files will break the parser if I move them from their original location. After hunting a bit, I found the global\_script\_class\_cache, but found that the files were actually correct there already. So, now I’m left a bit lost on how to fix this. I’ve searched the whole .godot directory for the outdated path string, with no results. Can anyone possibly point me to where this outdated reference might be stored so I can fix it? Apologize if this is some extremely basic problem or whatever, I’ve searched around a bit but wasn’t able to find any answers.

 ![funkyPaths](https://forum.godotengine.org/uploads/default/original/3X/d/6/d6122d219a1ebf73ac5abb9ebca41f230793a71e.png)

---

<div class="post-metadata">

**Author:** ![teotigraphix](https://forum.godotengine.org/user_avatar/forum.godotengine.org/teotigraphix/32/6034_2.png) [@teotigraphix](https://forum.godotengine.org/u/teotigraphix)\
**Post date:** [February 12, 2025, 6:40pm UTC](https://forum.godotengine.org/t/godot-permanently-caching-outdated-script-file-paths/101729/2 "2025-02-12T18:40:01Z")

</div>

Just realized it’s the actual path missing the actions dir.

---

<div class="post-metadata">

**Author:** ![Blander](https://forum.godotengine.org/user_avatar/forum.godotengine.org/blander/32/43833_2.png) [@Blander](https://forum.godotengine.org/u/Blander)\
**Post date:** [February 12, 2025, 6:55pm UTC](https://forum.godotengine.org/t/godot-permanently-caching-outdated-script-file-paths/101729/3 "2025-02-12T18:55:50Z")

</div>

Ah, sorry, I probably should’ve provided slightly more context, I’m too in my own head apparently.

The file in question declares class\_name BattleAction. It was previously located in BattleEngine/actions/BattleAction.gd, but I then moved that up a folder and renamed it to be consistent, so it went from BattleEngine/actions/BattleAction.gd to BattleEngine/battle\_action.gd. But for some reason, it continues to look in the old location, even though the path is correct in global\_script\_class\_cache, which is the only place I can find the paths being referenced at all.

And at the risk of being too overly basic, you can bet I tried restarting Godot. 😅

---

<div class="post-metadata">

**Author:** ![tibaverus](https://forum.godotengine.org/user_avatar/forum.godotengine.org/tibaverus/32/43649_2.png) [@tibaverus](https://forum.godotengine.org/u/tibaverus)\
**Post date:** [February 12, 2025, 7:05pm UTC](https://forum.godotengine.org/t/godot-permanently-caching-outdated-script-file-paths/101729/4 "2025-02-12T19:05:05Z")

</div>

You can simply delete the `.godot` folder, and on next startup of the project, it’ll be regenerated.

---

<div class="post-metadata">

**Author:** ![Blander](https://forum.godotengine.org/user_avatar/forum.godotengine.org/blander/32/43833_2.png) [@Blander](https://forum.godotengine.org/u/Blander)\
**Post date:** [February 12, 2025, 7:37pm UTC](https://forum.godotengine.org/t/godot-permanently-caching-outdated-script-file-paths/101729/5 "2025-02-12T19:37:41Z")

</div>

🤦‍♂️  
Thank you! This works! But…why? Are global class paths cached somewhere other than global\_script\_class\_cache? I just wanna understand what went wrong here.

---

<div class="post-metadata">

**Author:** ![tibaverus](https://forum.godotengine.org/user_avatar/forum.godotengine.org/tibaverus/32/43649_2.png) [@tibaverus](https://forum.godotengine.org/u/tibaverus)\
**Post date:** [February 12, 2025, 7:47pm UTC](https://forum.godotengine.org/t/godot-permanently-caching-outdated-script-file-paths/101729/6 "2025-02-12T19:47:37Z")

</div>

> [@Blander](#):
>
> global\_script\_class\_cache

I know nothing about this to be honest, as far as I know, the `.godot` folder is responsible for keeping track of project resources and cache.

---

<div class="post-metadata">

**Author:** ![dragonforge-dev](https://forum.godotengine.org/user_avatar/forum.godotengine.org/dragonforge-dev/32/26042_2.png) [@dragonforge-dev](https://forum.godotengine.org/u/dragonforge-dev)\
**Post date:** [February 13, 2025, 1:15am UTC](https://forum.godotengine.org/t/godot-permanently-caching-outdated-script-file-paths/101729/7 "2025-02-13T01:15:03Z")

</div>

> [@Blander](#):
>
> Thank you! This works! But…why? Are global class paths cached somewhere other than global\_script\_class\_cache? I just wanna understand what went wrong here.

There’s a long explanation in the [Godot 4.4 beta-1 release notes](https://godotengine.org/article/dev-snapshot-godot-4-4-beta-1/#breaking-changes) under breaking changes for UIDs on this and how they fixed it going forward.

---

<div class="post-metadata">

**Author:** ![Blander](https://forum.godotengine.org/user_avatar/forum.godotengine.org/blander/32/43833_2.png) [@Blander](https://forum.godotengine.org/u/Blander)\
**Post date:** [February 13, 2025, 8:24am UTC](https://forum.godotengine.org/t/godot-permanently-caching-outdated-script-file-paths/101729/8 "2025-02-13T08:24:07Z")

</div>

This is exactly what I was looking for! Thank you so much!

---

<div class="post-metadata">

**Author:** ![Blander](https://forum.godotengine.org/user_avatar/forum.godotengine.org/blander/32/43833_2.png) [@Blander](https://forum.godotengine.org/u/Blander)\
**Post date:** [February 13, 2025, 9:34am UTC](https://forum.godotengine.org/t/godot-permanently-caching-outdated-script-file-paths/101729/9 "2025-02-13T09:34:01Z")

</div>

Err, okay, maybe spoke too soon. 😅 Deleting the .godot folder works, but not in all cases. If I start my test scene directly, there is no error; however, if I load the scene and add it to the scene tree later, it gives me the exact same error referencing the old path.

I’m guessing 4.4 will fix this, so it’s not the end of the world to put the script back where it used to be until a stable build is available.

---

<div class="post-metadata">

**Author:** ![teotigraphix](https://forum.godotengine.org/user_avatar/forum.godotengine.org/teotigraphix/32/6034_2.png) [@teotigraphix](https://forum.godotengine.org/u/teotigraphix)\
**Post date:** [February 13, 2025, 10:50pm UTC](https://forum.godotengine.org/t/godot-permanently-caching-outdated-script-file-paths/101729/10 "2025-02-13T22:50:33Z")

</div>

Shooting in the dark but what if it’s a meta import File of an actual asset, that is not in the .godot folder.

---

<div class="post-metadata">

**Author:** ![Blander](https://forum.godotengine.org/user_avatar/forum.godotengine.org/blander/32/43833_2.png) [@Blander](https://forum.godotengine.org/u/Blander)\
**Post date:** [February 15, 2025, 1:42pm UTC](https://forum.godotengine.org/t/godot-permanently-caching-outdated-script-file-paths/101729/11 "2025-02-15T13:42:30Z")

</div>

I looked around and I didn’t find any suspicious files, so I feel like it’s gotta be a totally unrelated import file if that’s what it is… Which would be really weird since .gd files aren’t tracked that way… But I’ve really got no other idea at this point.

---

<div class="post-metadata">

**Author:** ![system](https://forum.godotengine.org/uploads/default/original/2X/4/4b0a7fa8a6334634b94a13d421f0d99e6f04e21f.svg) [@system](https://forum.godotengine.org/u/system)\
**Post date:** [March 17, 2025, 1:42pm UTC](https://forum.godotengine.org/t/godot-permanently-caching-outdated-script-file-paths/101729/12 "2025-03-17T13:42:50Z")

</div>

Closed on March 17, 2025, 1:42pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
