FlaShG / GitMerge-for-Unity

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

Get prefab merging running again #54

Closed FlaShG closed 2 years ago

FlaShG commented 4 years ago

Prefab merging isn't working at all at this time.

dziemich commented 4 years ago

Does this mean, the tool is only suitable for resolving scene conflicts at this point?

FlaShG commented 4 years ago

In my most recent tests, yes.

EthanGrahn commented 3 years ago

I'm just starting to take a look at this and have some potential workarounds to begin fixing the prefab merge. These are only starting points though. First would be to have the prefab tab of the editor use UnityEngine.Object to be able to drop in the prefab with conflicts. That will require additional processing after the fact since it still cannot be treated as a GameObject. Second would be to comment out the merge conflict indicators in the yaml code of the prefab. This allows it to load as a GameObject again, but additional parsing will be needed since that will not mesh with your current system.

FlaShG commented 3 years ago

@EthanGrahn when having GMfU in a project, it's a good idea to either serialize files into binary or tell the VCS to skip automatic merging for scene and prefab files. The primary issue with prefab merging at this time is the complexity that the nested prefabs update introduced to how prefabs work. Properties are not longer just things with values in them, but can have overrides and references to other prefabs, which would need to be supported by the prefab merge process.

nick-dodonov commented 3 years ago

Unfortunately confirm the same:

  1. using *.prefab binary in .gitattributes isn't useful because some things is easier to solve with text merging
  2. prefab merging is not woring with nested prefabs (it shows completely incorrect differences) 😞
FlaShG commented 2 years ago

Prefabs are now working on again on a base level. I have not gotten into nested prefabs or prefab variants yet, so those will likely not work yet.

Edit: I'm closing this ticket, making the nested prefabs/prefab variants support a follow-up ticket.