Skip to content
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

Editor: Warn on UID duplicates #92972

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

ogapo
Copy link
Contributor

@ogapo ogapo commented Jun 10, 2024

This commonly occurs when files are copied outside of the editor and don't get new UIDs.

Restricting this warning to first_scan since we want to exclude the case of files being moved after initial load which is harder to handle.

Closes godotengine/godot-proposals#8949

@AThousandShips AThousandShips added this to the 4.x milestone Jun 10, 2024
@AThousandShips AThousandShips requested a review from a team June 10, 2024 12:36
@AThousandShips AThousandShips changed the title editor: warn on UID duplicates Editor: Warn on UID duplicates Jun 10, 2024
editor/editor_file_system.cpp Outdated Show resolved Hide resolved
editor/editor_file_system.cpp Outdated Show resolved Hide resolved
This commonly occurs when files are copied outside of the editor and don't get new UIDs.

Restricting this warning to first_scan since it's we want to exclude the case of files being moved after initial load which is harder to handle.

Addresses godotengine/godot-proposals#8949
@ogapo ogapo force-pushed the pr/warn-on-duplicate-uids branch from 2ddd55b to 5122a3e Compare June 12, 2024 20:44
@JustCozzie
Copy link

JustCozzie commented Jun 17, 2024

Would love this to be brought in. As a beginner UIDs in general are not common knowledge, or mentioned in learning resources, leading to a lot of confusion and time wasted when UID conflicts are the source of problems. Would it make sense to include in the warning how to go about fixing the issue, when it is detected?

Copy link
Member

@RandomShaper RandomShaper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. If there's some quirk with this once in the wild, it can be patched later. It'd be harmless anyway.

@akien-mga akien-mga modified the milestones: 4.x, 4.4 Jun 19, 2024
ogapo added a commit to dykwia-labs/godot that referenced this pull request Jun 23, 2024
Copy link
Member

@AThousandShips AThousandShips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't tested but the code looks right

@akien-mga akien-mga merged commit 8ba3c2a into godotengine:master Sep 18, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants