-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicated files or resources retains the same UID #54774
Comments
Until this is fixed, one can create a new scene (without using duplication) and copy paste the nodes, instead. I think this is quite a high-priority bug in terms of how confusing it is for users. Thanks! |
I think this is fixed, I can't reproduce it on v4.0.alpha.custom_build [272b355]. 2022-03-06.17-03-38.mp4 |
It was worked around in #55584, but we're not convinced that it's the proper fix for it. |
I can reproduce it with AtlasTexture. scene src
project here uid same bug.zip |
I can still reproduce this for scene UIDs on 4.0 alpha 6 by duplicating a folder with a scene inside. The scene keeps the UID, even after changing the scene. |
Will this be fixed before BETA? It looks like a very annoying bug that affects my workflow every single day. |
While this will be fixed before stable release, contributors work on a best-effort basis. Therefore, we can't make guarantees on whether this will be fixed before beta1 is released. |
I'm lowering the priority of this issue and marking it to be fixed in beta rather than alpha. We've implemented a temporary fix before alpha 2 which covers all the text resources (#55584). Binary resources may not be handled well yet, but it should be okay for now. |
I just ran into this bug again on v4.1.1.stable.mono.official [bd6af8e]. Duplicated a scene a couple times, but they each have the same UID |
Same thing here on 4.1.1.stable.mono and 4.1.2.stable.mono. |
just experienced it as well, same version :/ |
my godot freezes when importing 5 image as atlas in 4.2.1 |
For those who are still experiencing this issue: Make sure that you duplicate resource/scene files using Godot's FileSystem dock and not your operating systems file manager (File Explorer, Finder, shell, etc.). The former will create new UIDs as needed, whereas the latter obviously will not. It'd be nice if Godot displayed a warning when it detects multiple resource/scene files with the same UID, which can prevent a lot of headache*. * I spent 15 minutes scratching my head why different fbx files that I configured to use different external material files all kept using the same material file (I kept reimporting them, thinking I must have misconfigured their import settings). While I did guess a UID issue in the end and checked, many junior developers may give up if they don't know about UIDs. |
Just to add to @ArdaE's comment. Not a junior dev but new to Godot and lost a lot of time troubleshooting this issue with copied textures used in multiple materials. Didn't know about the UIDs until I did a diff against a working, simple project, vs my main project. A warning for duplicate UIDs would be great. |
I've added a discussion for a warning, godotengine/godot-proposals#8949, which someone may hopefully implement. It should be fairly easy to implement it. |
I am experiencing this as well in my first project. I just found the cause of the issue which is this: duplicate UIDs. |
Specifically from duplicating a file inside the editor? Or from copying the file manually? |
I can't comment on that since I'm not the individual that actually copied the file (it was a 2-man hobby project). I just noticed that the UID for the resources were identical which was causing materials to differ between editor and runtime. |
Godot version
4.0.dev (56cfebb)
System information
Windows 10
Issue description
When duplicating a file through the FileSystem dock, the duplicated file has the same UID as the original file. This leads to the wrong file being used later on, if something references the original and duplicated files.
Steps to reproduce
Duplicate a file through the FileSystem dock.
Open the original file in a text editor (or it's .import file if it has one)
Open the duplicated file the same way.
Notice that both file's UIDs are identical.
To see the issue with duplicated UIDs:
Duplicate a file through the FileSystem dock.
Add both the original and duplicated files to a scene.
Run the scene.
Notice that, instead of loading the original file, the duplicated file was loaded twice.
Minimal reproduction project
DuplicateTest.zip
Bugsquad edit (keywords for easier searching): ID
The text was updated successfully, but these errors were encountered: