- Home /
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 (http://docs.unity3d.com/Manual/SmartMerge.html). 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"
Answer by MrMatthias · Jan 24, 2017 at 11:04 AM
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. $$anonymous$$y error comes up saying that my LOCAL file is not a valid text file. But since YA$$anonymous$$L is creating the BASE, LOCAL, and RE$$anonymous$$OTE how is this something I can change?
I had a similar issue and what I noticed was that the YA$$anonymous$$L file in question had merge conflict sections that had somehow been committed. So even though the file was text, the BASE file created was invalid due to those sections that should not have been in a committed file. The only solution I had was to fix up that file manually. Hope that helps.