123456789101112131415161718192021222324252627282930313233343536373839 |
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- namespace ShadowStudio.Model
- {
- /// <summary>
- /// 引用类型的资源管理
- /// </summary>
- public class ReferencesLoadHandler : ArtInstanceHandler
- {
- public override Object LoadArt()
- {
- if (!LoadCache && ArtInfoMgr.Instance != null)
- {
- var conf = ArtInfoMgr.Instance.GetResConf(Info.Url);
- if (conf && conf.resModelList != null)
- {
- for (int i = 0; i < conf.resModelList.Count; i++)
- {
- if (conf.resModelList[i] && conf.resModelList[i].name == Info.ArtName)
- {
- LoadCache = conf.resModelList[i];
- break;
- }
- }
- }
- }
- return LoadCache;
- }
- public override void LoadArtAsyn(string path, System.Action<float> process, System.Action<Object> loaded)
- {
- process?.Invoke(1);
- loaded?.Invoke(LoadArt());
- }
- }
- }
|