public void linkSkelModel() { m_modelGo = m_modelRes.InstantiateObject(m_modelRes.GetPath()); UtilApi.SetParent(m_modelGo, m_skelRootGo); if (m_skinRes.refCountResLoadResultNotify.resLoadState.hasSuccessLoaded()) { UtilSkin.skinSkel(m_modelGo, m_skelRootGo, m_skinRes.boneArr); } }
public void onSkinLoaded(IDispatchObject dispObj) { SkinRes res = dispObj as SkinRes; Ctx.m_instance.m_logSys.logLoad(res); if (res.refCountResLoadResultNotify.resLoadState.hasSuccessLoaded()) { if (m_skelRootGo != null) { if (m_modelGo != null) { UtilSkin.skinSkel(m_modelGo, m_skelRootGo, m_skinRes.boneArr); } } } else if (res.refCountResLoadResultNotify.resLoadState.hasFailed()) { Ctx.m_instance.m_modelMgr.unload(res.GetPath(), onSkinLoaded); m_skinRes = null; } }