예제 #1
0
 /// <summary>
 /// 按tag来监视资源
 /// </summary>
 /// <param name="gameObject"></param>
 /// <param name="tag"></param>
 public override void Monitor(GameObject gameObject, int tag)
 {
     if (gameObject != null)
     {
         AssetRefercenceMonitor monitor = gameObject.GetComponent <AssetRefercenceMonitor>();
         if (monitor == null)
         {
             monitor = gameObject.AddComponent <AssetRefercenceMonitor>();
         }
         monitor.AddAssetReference(this, tag);
     }
 }
예제 #2
0
 /// <summary>
 /// 直接监视资源
 /// </summary>
 /// <param name="gameObject"></param>
 public override void Monitor(GameObject gameObject)
 {
     if (gameObject != null)
     {
         AssetRefercenceMonitor monitor = gameObject.GetComponent <AssetRefercenceMonitor>();
         if (monitor == null)
         {
             monitor = gameObject.AddComponent <AssetRefercenceMonitor>();
         }
         monitor.assetReference = this;
     }
 }