UnityYAMLMerge: File is not a valid text serialization YAML file

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:

Error parsing file './Assets/World/Workstation_BASE_43921.unity': File is not a valid text serialized YAML file. Make sure that Asset Serialization is set to 'Force text' in Editor Settings.

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"

I agree that it's actually a bit confusing, not all classes or APIs are the best example of software engineering principles.

1 Answer

1

UnityYAMLMerge uses a three-way file merging technique. The Base file that both your changes origin from is still not serialized as text

I have the same issue and all my files serialized as text. My error comes up saying that my LOCAL file is not a valid text file. But since YAML is creating the BASE, LOCAL, and REMOTE how is this something I can change?