public ProjectExporter(IFileCollection fileCollection)
        {
            m_fileCollection = fileCollection;

            DummyAssetExporter dummyExporter = new DummyAssetExporter();

            OverrideExporter(ClassIDType.AnimatorController, dummyExporter);
            OverrideExporter(ClassIDType.MonoScript, dummyExporter);
            OverrideExporter(ClassIDType.MonoManager, dummyExporter);
            OverrideExporter(ClassIDType.BuildSettings, dummyExporter);
            OverrideExporter(ClassIDType.AssetBundle, dummyExporter);
            OverrideExporter(ClassIDType.PreloadData, dummyExporter);
            OverrideExporter(ClassIDType.Sprite, dummyExporter);
            OverrideExporter(ClassIDType.SpriteAtlas, dummyExporter);

            YAMLAssetExporter yamlExporter = new YAMLAssetExporter();

            OverrideExporter(ClassIDType.GameObject, yamlExporter);
            OverrideExporter(ClassIDType.Transform, yamlExporter);
            OverrideExporter(ClassIDType.Camera, yamlExporter);
            OverrideExporter(ClassIDType.Material, yamlExporter);
            OverrideExporter(ClassIDType.MeshRenderer, yamlExporter);
            OverrideExporter(ClassIDType.OcclusionCullingSettings, yamlExporter);
            OverrideExporter(ClassIDType.MeshFilter, yamlExporter);
            OverrideExporter(ClassIDType.OcclusionPortal, yamlExporter);
            OverrideExporter(ClassIDType.Mesh, yamlExporter);
            OverrideExporter(ClassIDType.Rigidbody2D, yamlExporter);
            OverrideExporter(ClassIDType.Rigidbody, yamlExporter);
            OverrideExporter(ClassIDType.CircleCollider2D, yamlExporter);
            OverrideExporter(ClassIDType.PolygonCollider2D, yamlExporter);
            OverrideExporter(ClassIDType.BoxCollider2D, yamlExporter);
            OverrideExporter(ClassIDType.PhysicsMaterial2D, yamlExporter);
            OverrideExporter(ClassIDType.MeshCollider, yamlExporter);
            OverrideExporter(ClassIDType.BoxCollider, yamlExporter);
            OverrideExporter(ClassIDType.CompositeCollider2D, yamlExporter);
            OverrideExporter(ClassIDType.EdgeCollider2D, yamlExporter);
            OverrideExporter(ClassIDType.CapsuleCollider2D, yamlExporter);
            OverrideExporter(ClassIDType.AnimationClip, yamlExporter);
            OverrideExporter(ClassIDType.AudioListener, yamlExporter);
            OverrideExporter(ClassIDType.AudioSource, yamlExporter);
            OverrideExporter(ClassIDType.RenderTexture, yamlExporter);
            OverrideExporter(ClassIDType.Avatar, yamlExporter);
            OverrideExporter(ClassIDType.GUILayer, yamlExporter);
            OverrideExporter(ClassIDType.Animator, yamlExporter);
            OverrideExporter(ClassIDType.RenderSettings, yamlExporter);
            OverrideExporter(ClassIDType.Light, yamlExporter);
            OverrideExporter(ClassIDType.Animation, yamlExporter);
            OverrideExporter(ClassIDType.FlareLayer, yamlExporter);
            OverrideExporter(ClassIDType.PhysicMaterial, yamlExporter);
            OverrideExporter(ClassIDType.SphereCollider, yamlExporter);
            OverrideExporter(ClassIDType.CapsuleCollider, yamlExporter);
            OverrideExporter(ClassIDType.SkinnedMeshRenderer, yamlExporter);
            OverrideExporter(ClassIDType.WheelCollider, yamlExporter);
            OverrideExporter(ClassIDType.TerrainCollider, yamlExporter);
            OverrideExporter(ClassIDType.TerrainData, yamlExporter);
            OverrideExporter(ClassIDType.OcclusionArea, yamlExporter);
            OverrideExporter(ClassIDType.LightmapSettings, yamlExporter);
            OverrideExporter(ClassIDType.NavMeshSettings, yamlExporter);
            OverrideExporter(ClassIDType.ParticleSystem, yamlExporter);
            OverrideExporter(ClassIDType.ParticleSystemRenderer, yamlExporter);
            OverrideExporter(ClassIDType.SpriteRenderer, yamlExporter);
            OverrideExporter(ClassIDType.Terrain, yamlExporter);
            OverrideExporter(ClassIDType.AnimatorOverrideController, yamlExporter);
            OverrideExporter(ClassIDType.CanvasRenderer, yamlExporter);
            OverrideExporter(ClassIDType.Canvas, yamlExporter);
            OverrideExporter(ClassIDType.NavMeshData, yamlExporter);
            OverrideExporter(ClassIDType.OcclusionCullingData, yamlExporter);
            OverrideExporter(ClassIDType.Prefab, yamlExporter);
            OverrideExporter(ClassIDType.AvatarMask, yamlExporter);
            OverrideExporter(ClassIDType.SceneAsset, yamlExporter);
            OverrideExporter(ClassIDType.LightmapParameters, yamlExporter);

            BinaryAssetExporter binExporter = new BinaryAssetExporter();

            OverrideExporter(ClassIDType.Texture2D, binExporter);
            OverrideExporter(ClassIDType.Shader, binExporter);
            OverrideExporter(ClassIDType.TextAsset, binExporter);
            OverrideExporter(ClassIDType.AudioClip, binExporter);
            OverrideExporter(ClassIDType.Cubemap, binExporter);
            OverrideExporter(ClassIDType.Font, binExporter);
            OverrideExporter(ClassIDType.MovieTexture, binExporter);
        }
Exemple #2
0
        public AssetsExporter()
        {
            DummyAssetExporter dummyExporter = new DummyAssetExporter();

            OverrideExporter(ClassIDType.AnimatorController, dummyExporter);
            OverrideExporter(ClassIDType.MonoScript, dummyExporter);
            OverrideExporter(ClassIDType.BuildSettings, dummyExporter);
            OverrideExporter(ClassIDType.AssetBundle, dummyExporter);
            OverrideExporter(ClassIDType.Sprite, dummyExporter);
            OverrideExporter(ClassIDType.SpriteAtlas, dummyExporter);

            YAMLAssetExporter yamlExporter = new YAMLAssetExporter();

            OverrideExporter(ClassIDType.Prefab, yamlExporter);
            OverrideExporter(ClassIDType.Component, yamlExporter);
            OverrideExporter(ClassIDType.GameObject, yamlExporter);
            OverrideExporter(ClassIDType.Camera, yamlExporter);
            OverrideExporter(ClassIDType.Material, yamlExporter);
            OverrideExporter(ClassIDType.Mesh, yamlExporter);
            OverrideExporter(ClassIDType.Rigidbody2D, yamlExporter);
            OverrideExporter(ClassIDType.Rigidbody, yamlExporter);
            OverrideExporter(ClassIDType.CircleCollider2D, yamlExporter);
            OverrideExporter(ClassIDType.PolygonCollider2D, yamlExporter);
            OverrideExporter(ClassIDType.BoxCollider2D, yamlExporter);
            OverrideExporter(ClassIDType.PhysicsMaterial2D, yamlExporter);
            OverrideExporter(ClassIDType.MeshCollider, yamlExporter);
            OverrideExporter(ClassIDType.BoxCollider, yamlExporter);
            OverrideExporter(ClassIDType.SpriteCollider2D, yamlExporter);
            OverrideExporter(ClassIDType.EdgeCollider2D, yamlExporter);
            OverrideExporter(ClassIDType.CapsuleCollider2D, yamlExporter);
            OverrideExporter(ClassIDType.AnimationClip, yamlExporter);
            OverrideExporter(ClassIDType.AudioListener, yamlExporter);
            OverrideExporter(ClassIDType.AudioSource, yamlExporter);
            OverrideExporter(ClassIDType.RenderTexture, yamlExporter);
            OverrideExporter(ClassIDType.Avatar, yamlExporter);
            OverrideExporter(ClassIDType.GUILayer, yamlExporter);
            OverrideExporter(ClassIDType.Light, yamlExporter);
            OverrideExporter(ClassIDType.FlareLayer, yamlExporter);
            OverrideExporter(ClassIDType.PhysicMaterial, yamlExporter);
            OverrideExporter(ClassIDType.SphereCollider, yamlExporter);
            OverrideExporter(ClassIDType.CapsuleCollider, yamlExporter);
            OverrideExporter(ClassIDType.WheelCollider, yamlExporter);
            OverrideExporter(ClassIDType.TerrainCollider, yamlExporter);
            OverrideExporter(ClassIDType.TerrainData, yamlExporter);
            OverrideExporter(ClassIDType.ParticleSystem, yamlExporter);
            OverrideExporter(ClassIDType.ParticleSystemRenderer, yamlExporter);
            OverrideExporter(ClassIDType.SpriteRenderer, yamlExporter);
            OverrideExporter(ClassIDType.Terrain, yamlExporter);
            OverrideExporter(ClassIDType.AnimatorOverrideController, yamlExporter);
            OverrideExporter(ClassIDType.CanvasRenderer, yamlExporter);
            OverrideExporter(ClassIDType.Canvas, yamlExporter);
            OverrideExporter(ClassIDType.AvatarMask, yamlExporter);

            BinaryAssetExporter binExporter = new BinaryAssetExporter();

            OverrideExporter(ClassIDType.Texture2D, binExporter);
            OverrideExporter(ClassIDType.Shader, binExporter);
            OverrideExporter(ClassIDType.TextAsset, binExporter);
            OverrideExporter(ClassIDType.AudioClip, binExporter);
            OverrideExporter(ClassIDType.Cubemap, binExporter);
            OverrideExporter(ClassIDType.Font, binExporter);
            OverrideExporter(ClassIDType.MovieTexture, binExporter);
        }