Closed motoyinc closed 6 months ago
Hi !
Sorry but I believe this functionality, although optional, would break the purpose of this package stated in the documentation which is:
This project aims to provide a python3 API to load and dump Unity YAML files(configurations, prefabs, scenes, serialized data, etc) in the exact same format the internal Unity YAML serializer does.
but, the .meta file has no tags mentioned in the documentation. When I edit a .meta file and save it, a tag is added to the file, even though the .meta file originally contains no tags.
The original .meta
fileFormatVersion: 2 guid: e3aaabe8179709270b60483664db46c8 NativeFormatImporter: externalObjects: {} mainObjectFileID: 100100000 userData: assetBundleName: assetBundleVariant:
The modified .meta.
%YAML 1.1 %TAG !u! tag:unity3d.com,2011: fileFormatVersion: 2 guid: e3aaabe8179709270b60483664db46c8 NativeFormatImporter: externalObjects: {} mainObjectFileID: 100100000 userData: assetBundleName: assetBundleVariant:
You are right, I've added a test to prove it. I don't think the solution to this problem should be an optional parameter but rather to preserve the previous yaml tag state and avoid adding them if they were missing. Let me give it a try and see what I can come up with. Thanks for the contribution !
Description
This merge request introduces a new property to handle Unity meta files more efficiently during the save operation. Unity meta files do not utilize header tags; however, our current save functionality does not differentiate between file types. This update adds a property to identify Unity meta files specifically and ensures that header tags are not included upon saving these files.