public void Release() { ReleaseDownLoadCoroutine(); m_clothParticleEffect = null; m_extraParticleEffect = null; m_callBackDownLoadFinish = null; if (m_SMRs != null) { foreach (GameObject smr in m_SMRs) { GameObject.Destroy(smr); } m_SMRs.Clear(); } if (m_SkinLoader != null) { m_SkinLoader.Release(); m_SkinLoader = null; } if (m_ModelLoader != null) { m_ModelLoader.Release(); m_ModelLoader = null; } }
public static SkinnLoader GetkinnedMeshRendererLoader(string strFileName, string childPath) { SkinnLoader Loader = null; if (m_mapRoleBodyLoader.ContainsKey(strFileName)) { Loader = m_mapRoleBodyLoader[strFileName]; Loader.m_RefNum += 1; } else { Loader = new SkinnLoader(strFileName, childPath); m_mapRoleBodyLoader.Add(strFileName, Loader); } return(Loader); }
private IEnumerator LoadBody() { bool isSkinLoadSuc = false; bool isModelLoadSuc = false; IEnumerator itor = null; if (m_SkinLoader == null) { m_SkinLoader = SkinnLoader.GetkinnedMeshRendererLoader(m_ResuceName, m_ChildPath); } if (m_SkinLoader != null) { itor = m_SkinLoader.LoadMeshRenderer(); while (itor.MoveNext()) { yield return(null); } isSkinLoadSuc = m_SkinLoader.IsLoadSuc; } if (m_ModelLoader == null) { m_ModelLoader = ModelLoader.GetModelLoader(m_ResuceName, m_ChildPath); } if (m_ModelLoader != null) { itor = m_ModelLoader.LoadModel(); while (itor.MoveNext()) { yield return(null); } isModelLoadSuc = m_ModelLoader.IsLoadSuc; } if (m_callBackDownLoadFinish != null) { m_callBackDownLoadFinish(this, isSkinLoadSuc || isModelLoadSuc); } }