starikcetin/Eflatun.SceneReference

GitIgnored scenes being added to SceneGuidToPathMap json

Ale1 opened this issue · 4 comments

Ale1 commented

(1) Add one of your scenes to .gitignore
(2) run SceneGuitToPathMap. the .gitignored scene will be partof the json.
(3) howeber, other users of the repo wont have that scene in their proj (since gitignored) but it wil be listed in the map.

there could be potential issues where users create a new asset, and it gets randomly assigned the same guid that according to the scene map is pointing to a scene, but accoriding to unity its pointing to a completely unrelated asset.

It is extremely unlikely for Unity to generate the same GUID twice, so the general consensus when working with them is to ignore that possibility altogether. GUID collisions usually happen due to user error; such as duplicating the meta files, partially reverting in version control, etc.

However, yes, we should still give an option to skip scenes ignored in version control, in order to prevent irrelevant changes. I will work on it.

On second thought: instead of trying to figure out which files are ignored in version control, which would slow the editor down, would be hard to implement, and cause a lot of bloat in the package; just ignoring the map file itself in version control might be a better idea. It is a generated file after all and will get re-generated according to the settings.

What do you think? @Ale1

Closed with #16.

Added a new section to README that recommends ignoring the map file, and made the generator generate a .keep file in the map folder to make sure the folder gets tracked by all version control systems without issues.

Will be included in the next release.

Included in 1.2.1.