Repository navigation
Conversation
NavMesh assets are required to have binary handling otherwise they are breaking in git and then you are getting missed reference and unreadable file
|
@Sont3k - It is the same thing for terrain assets. It is possible to modify this as well? |
I haven't checked if terrain assets have the same issue, but can be a similar case |
|
Could you try this change at the top instead of the - [attr]unity-yaml merge=unityyamlmerge eol=lf linguist-language=yaml
+ [attr]unity-yaml text=auto eol=lf merge=unityyamlmerge linguist-language=yamlThis should prevent the The only possible issue I see with this: the other attributes still apply to both text and binary files and I haven't verified whether or not See #231 (comment) and fe1bd9e#r198092088 for longer explanations. |
Your proposed change is working well from what I see.
Can't say for sure for other binary files, but seems for NavMeshSurface it is enough to fix a behavior. |
This comment was marked as outdated.
This comment was marked as outdated.
|
Ignore my previous message, I've tested that scenario and it skips the file, even with ~/UnityYAMLMerge.exe merge --force --fallback none _base/NavMesh.asset _remote/NavMesh.asset _local/NavMesh.asset MERGED/NavMesh.asset
# Error parsing file '_base\NavMesh.asset': File is not a valid text serialized YAML file. Make sure that Asset Serialization is set to 'Force text' in Editor Settings.Safe to say the only problem was the |
FurkanKambay
left a comment
There was a problem hiding this comment.
I found out that /ProjectSettings/NavMeshAreas.asset exists, which matches the rule NavMesh*.asset.
Recommend Assets/**/*NavMesh*.asset
and text=auto for the macro
Updated unity-yaml attribute to include text=auto.
I have update PR with changes that we have tested last time. Explicit filtering for NavMesh asset was removed as just adding "text=auto" was enough to solve all issues that I had in the beginning. Thanks for your help. |
|
Would this solution solve also the problem with the Terrain.asset file corruption? |
I can test it on my side but I need to get from you steps that you did for terrain asset. |
NavMesh assets are required to have binary handling otherwise they are breaking in git and then you are getting missed reference in game object components and unreadable file