// // Copyright (c) 2019- yutopp (yutopp@gmail.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt) // using System; using System.Collections.Generic; using UnityEngine; namespace VGltf.Unity { public sealed class ImporterRuntimeResources : IDisposable { public IndexedResourceDict Nodes = new IndexedResourceDict(); public IndexedResourceDict Textures = new IndexedResourceDict(); public IndexedResourceDict Materials = new IndexedResourceDict(); public IndexedResourceDict Meshes = new IndexedResourceDict(); public IndexedDisposableResourceDict Animations = new IndexedDisposableResourceDict(); public Dictionary AuxResources { get; } = new Dictionary(); public void Dispose() { Animations.Dispose(); Nodes.Dispose(); Meshes.Dispose(); Materials.Dispose(); Textures.Dispose(); foreach(var disposable in AuxResources) { disposable.Value.Dispose(); } } } }