FlaShG / GitMerge-for-Unity

Unity plugin for merging sceneand prefabs files when using git.
GNU General Public License v2.0
197 stars 26 forks source link

Prefab instances have no local identifier in their scene file #17

Closed FlaShG closed 4 years ago

FlaShG commented 9 years ago

(Original issue title: "Test the tool with Unity 5")

The new scene management inside the editor might break a lot.

FlaShG commented 9 years ago

It seems like the m_LocalIdentfierInFile property (used by the ObjectIDFinder) is 0 in Unity 5 for Objects not differing from their Prefab/Asset counterpart. This breaks the ObjectDictionaries system.

randomPoison commented 9 years ago

Heads up: It looks like Unity 5 is going to have a scene merge tool built in: http://blogs.unity3d.com/2015/02/17/production-workflow-improvements/

FlaShG commented 9 years ago

Had to laugh about this line: "Of course all of the above only applies when you are using text serialisation, if you keep scenes and other serialized files in binary format, conflict cannot be resolved and scenes cannot be merged."

NickolausDS commented 9 years ago

The article doesn't appear to mention whether their merging tool will be a pro feature or a free one. Is it too early to tell, or would they reference that elsewhere?

FlaShG commented 9 years ago

I can't tell. But the line i quoted makes me wonder if their solution is even better than comparable to GitMerge. I mean, form what I understood, their tool only does some pre-merge line magic, and maybe doesn't even help with the actual merging process. I think i will go and ask the folks over at Unity Tech about this.

FlaShG commented 9 years ago

Please vote here: http://feedback.unity3d.com/suggestions/re-add-local-identifiers-in-scene-file-for-prefab-instances Without Unity Tech. changing this, the tool will not work in Unity 5 :disappointed:

randomPoison commented 9 years ago

I just tried with the release version of Unity 5, and it seems like m_LocalIdentfierInFile is working. The values seem valid and I can confirm by looking at the serialized file that they are still working. At the least merging prefabs still works, though I haven't tried merging scenes. Perhaps they added it back in before the full release?

FlaShG commented 9 years ago

The problem is not in merging perfabs, but having prefab instances in a scene. Those instances do not have their own id within the scene file. Read more here: http://forum.unity3d.com/threads/how-to-get-the-local-identifier-in-file-for-scene-objects.265686/#post-1974654

I just downloaded 5.0.0f4, and the problem still exists.

randomPoison commented 9 years ago

Ah, okay. Sorry for the confusion.

FlaShG commented 9 years ago

Nothing new concerning the feedback post. It has received enough attention to be on the front page in the "most activity" section for some time though. Thanks everyone for voting!

I hope we can have this problem solved so we can work on the tool again.

kentmw commented 7 years ago

Any update? Is this tool useful in the current state of Unity?

FlaShG commented 7 years ago

I haven't heard of this being changed in Unity, and they probably want to push their own solutions anyway. I also haven't tested in quite a while. If someone finds that this issue is (or can be) solved, I would start working on this project again.

FlaShG commented 4 years ago

Would you look at that... five years later.

https://forum.unity.com/threads/how-to-get-the-local-identifier-in-file-for-scene-objects.265686/#post-5269128

I'll check whether this is what we've been waiting for, and if so, get the project up-to-date.

FlaShG commented 4 years ago

It looks like this does indeed do the trick. We're back in business!

The issue is hereby resolved, but if someone finds out that it isn't really, feel free to ring the alarm.