-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEnhancedAssetBundle.cs
More file actions
38 lines (32 loc) · 983 Bytes
/
Copy pathEnhancedAssetBundle.cs
File metadata and controls
38 lines (32 loc) · 983 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace ResourceManagement
{
public class EnhancedAssetBundle
{
internal AssetBundle AssetBundle { get; private set; }
internal ICollection<AssetBundle> DependencyByAssetBundles {get; private set;} = new HashSet<AssetBundle>();
internal bool HasDependcyBy => DependencyByAssetBundles.Count > 0;
internal EnhancedAssetBundle(AssetBundle assetBundle)
{
AssetBundle = assetBundle;
}
public void AddDependcy(AssetBundle assetBundle)
{
DependencyByAssetBundles.Add(assetBundle);
}
public bool Check()
{
try
{
var name = AssetBundle.name;
return true;
}
catch (MissingReferenceException)
{
return false;
}
}
}
}