public AssetCache(PersistentAssetCache cache) { nodes = new GameObject[cache.nodeCount]; buffers = new byte[cache.bufferCount][]; images = cache.images; meshes = cache.meshes; materials = cache.materials; animations = cache.animations; }
/// <summary> /// Stores a reference to the specified AssetCache if it does not already exist in the reference dictionary. /// </summary> private void AddReference(string gltfPath, AssetCache cache) { ReferenceCounter <PersistentAssetCache> refCounter; if (!assets.ContainsKey(gltfPath)) { var persistentCache = new PersistentAssetCache(cache); refCounter = new ReferenceCounter <PersistentAssetCache>(persistentCache); assets.Add(gltfPath, refCounter); } }