Esempio n. 1
0
        protected void ExportMeta(IExportCollection collection, string filePath)
        {
            Meta   meta     = new Meta(collection);
            string metaPath = $"{filePath}.meta";

            YAMLExporter.Export(meta, metaPath, false);
        }
        public override void Export(IExportCollection collection, string dirPath)
        {
            AssetExportCollection asset = (AssetExportCollection)collection;
            string subFolder            = asset.Asset.ClassID.ToString();
            string subPath  = Path.Combine(dirPath, subFolder);
            string fileName = GetUniqueFileName(asset.Asset, subPath);
            string filePath = Path.Combine(subPath, fileName);

            PrefabExportCollection prefab = collection as PrefabExportCollection;

            if (prefab == null)
            {
                YAMLExporter.Export(asset.Asset, filePath);
            }
            else
            {
                YAMLExporter.Export(prefab.Objects, filePath);
            }
            ExportMeta(collection, filePath);
        }