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.
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.
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.
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.
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.