1using System.Collections.Generic;
25 private static int _lastId;
27 private static readonly Dictionary<int, int> AssetUnloaders =
new Dictionary<int, int>();
36 private void Register()
38 if (!AssetUnloaders.ContainsKey(_id))
40 AssetUnloaders[_id] = 0;
44 AssetUnloaders[_id]++;
53 private void OnDestroy()
56 if (AssetUnloaders.TryGetValue(_id, out var value))
62 if (allocation ==
null)
68 AssetUnloaders.Remove(_id);
72 AssetUnloaders[_id] = value;
Represents a Class to destroy every Asset (Textures, Materials, Meshes) loaded by TriLib for this Gam...
static int GetNextId()
Gets the next allocation Identifier.
int Id
The Asset Unloader unique identifier.
List< Object > Allocations
Assets Allocation List.