Post

I see. I'd guess .uids won't show in the Godot file manager, and will be handled implicitly like .imports. And yeah, there's an extra step of having to move them when moving scripts externally, but we couldn't do it reliably at all before. The tradeoff seems worth it, but I get the inconvenience

I don’t know if I like this or not. On one hand this is helpful, but need to move two files all the time could be boring, most automated tools would not move too. Not sure, but maybe it’s just lack of my familiarity on this topic.

I don't. The friction it causes for what it solves feels like sabotage of engine principles thst made it fun. I have to move stuff in the editor anyway and explaining this to a beginner is a harsh extra.

Git mostly manages to track moves without the uid files. Perhaps there could be some helper screen to ask in case the move is ambiguous or incorporates some change. Stuff could be running in the background on a project open to verify the refs. Whatever else :)

I think currently you might need to manually re-save all scenes. But I agree we should provide a conversion tool that does it for you. I've actually long wanted to just have a "Re-save all scenes and resources" option for doing such clean version upgrades when we change small details.

Will this allow for cyclic reference chains in code/editor? Eg can we use this to export a resource UID var called foo, and then in editor point resource A's foo at resource B, and B's foo back at resource A? Having to map things centrally via strings thus far has felt pretty fragile/awkward 😅

(1/2) I had some problems migrating to UID files because two of my machines were trying to assign different UIDs to the same file, even when there was already a UID file from a commit.

(2/2) I solved the problem by deleting the UID files and the ".godot" folder on both machines. There is a UID cache file in the ".godot" folder, it should be enough to delete that file instead of the whole ".godot" folder.

I really do not like the idea of hundreds of extra files everywhere when I look through my projects. I would rather metadata be stored in a metadata directory or single metadata file so when I'm browsing my files I don't have to look at all that extra cruft.

I wonder if the uid changes could also fix uids just randomly changing during a project. They consistently create minor merge conflicts, it's pretty annoying.

A bit confused. So the extra files allow Godot to detect moving the scripts to a different directory even not from within Godot file manager. But this only happens if the scripts AND those extra files are moved? Which is OK if I move a whole directory, but for individual scripts it's mistake-prone.

The article is stating Godot auto-detects movement, but sounds like in reality users have to explicitly tell Godot that the movement of scripts happened by the fact of also manually moving the extra uid files. 😅

I assume if you move them within the Godot IDE, Godot will auto-manage the UIDs as well. So the UIDs are hidden like the .import files and when you move them, it moves the .uid files along with the resource file you moved. I guess the problem is moving the files outside of the Godot IDE.

Can we get some kind of functionality to alias these? I like the functionality that they offer, but the fact that they aren't really human-parsable outside the editor is problematic.

Is there a reason why the file name could not be added as a prefix to the UID that the engine would just parse out? So if the file is called banana_counter.gd, the uid would look like uid://banana_counter_xyz123. Then it would ignore everything before 'xyz123'.

It could, but if you rename it to `apple_counter.gd`, it would still have a `uid://banana_counter_xyz123` that might confused you. But otherwise yeah, that could be done I suppose. UIDs would become pretty lengthy which might also not be super popular, I don't know.

You know I noodled on this a bit more and it would be somewhat trivial for the user to make a global class with static members to serve as a string table. That way they could create their own aliases. Maybe something like this isn’t necessary?

The issue there is you keep an extra reference to resources you might not be needing to have loaded in anymore. If I could reference using an alias I think that would be neat. "uid://my_alias" would be good, they'd still need to be unique

My reflexive first pass at this design would be to have a full list of assets and their associated UIDs that the user could scroll thru and assign aliases. This could be in project settings or in a new “main” tab at the center top of the ui, perhaps next to asset lib.