0 votes

So I'm running Windows 10 (Godot 3.2.2.), I go out into the file explorer and re-organize my scene files there, and suddenly the game's not working. Turns up some "failed to load resource" type of errors. So I move everything back to where it was originally, the game works fine again. Now. When I move the files around inside of the engine in the "filesystem" tab, everything works fine. Why? What is the engine doing when I move resources around in-engine that it isn't doing when I do it in explorer?

p.s. Even when I load up the engine after moving things around in explorer, I would expect it to notice the changes and update the resource references accordingly... is this a missing feature or a bug on my end?

in Engine by (12 points)

1 Answer

+2 votes

https://docs.godotengine.org/en/stable/getting_started/step_by_step/filesystem.html

There are some drawbacks to this simple file system design. The first issue is that moving assets around (renaming them or moving them from one path to another inside the project) will break existing references to these assets. These references will have to be re-defined to point at the new asset location.

To avoid this, do all your move, delete and rename operations from within Godot, on the FileSystem dock. Never move assets from outside Godot, or dependencies will have to be fixed manually (Godot detects this and helps you fix them anyway, but why go the hard route?).

The second is that, under Windows and macOS, file and path names are case insensitive. If a developer working in a case insensitive host file system saves an asset as myfile.PNG, but then references it as myfile.png, it will work fine on their platform, but not on other platforms, such as Linux, Android, etc. This may also apply to exported binaries, which use a compressed package to store all files.

It is recommended that your team clearly define a naming convention for files when working with Godot. One simple fool-proof convention is to only allow lowercase file and path names.

by (1,879 points)

"same" in unity

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.