public T LoadResources <T>(EResourceType resType, string name) where T : Object { string path = GameResFunc.GetResPath(resType, name); if (string.IsNullOrEmpty(path)) { Log(ELogType.Error, string.Format("res path is null !!!!! resType : {0}", resType)); return(null); } T res = Resources.Load <T>(path); return(res); }
public void LoadResourcesAsync <T>(EResourceType resType, string name, DLoadResourcesCompete action) where T : Object { string path = GameResFunc.GetResPath(resType, name); if (string.IsNullOrEmpty(path)) { Log(ELogType.Error, string.Format("res path is null !!!!! resType : {0}", resType)); return; } ResLoadAsyncData data = GetAsyncData(path, action); m_resPathList.Add(data); if (m_asyncEnd) { StartCoroutine(LoadResAsync <T>()); } }