UnityYAMLMerge: "File is not a valid text serialization YAML file"

Hey everyone,

I tried to set up the UnityYAMLMerge tool in conjunction with Git. I changed the Asset Serialization mode to “Force text” and everything is in a neat YAML format now (i.e. I can open all asset files in a text editor). I set up everything according to the documentation page (Unity - Manual: Smart merge). However, I still get the following error message when trying to merge the files:

And I am very sure that both remote and local Workstation.unity files are YAML files. Could different line endings have anything to do with the error message?

My Git-config files looks like this:

[merge]                                                                             
    tool = unityyamlmerge                                                           
[mergetool "unityyamlmerge"]                                                        
    trustExitCode = false                                                           
    cmd = /Applications/Unity/Unity.app/Contents/Tools/UnityYAMLMerge merge -p "$BASE" "$REMOTE" "$LOCAL" "$MERGED"

Hi… sorry about the late reply… all Unity devs has just been away on hackweek :slight_smile:

No… different line endings should be handled just fine. Even though remote and local files are valid yaml the base file could still be binary format. That would fit well with the error message you get stating that ./Assets/World/Workstation_BASE_43921.unity is the one causing trouble… not the “BASE” in the file name.

Can you verify this?

Sorry for my late reply as well!

That was indeed what happened. The common ‘BASE’ file was still a binary. So after fixing that one merge conflict, all the subsequent merge conflicts resolved automagically (which is really kinda scary, cause I have no idea what your UnityYAMLTool really does under the hood and the merge output is rather scarce :slight_smile: ).

Could you please elaborate on how this can happen? My BASE version is indeed not text (actually, in my case it is actually empty, zero bytes), but why? LOCAL and REMOTE are fine.