예제 #1
0
        protected void OnMeshLoadResult(bool result, IRes res)
        {
            if (result)
            {
                MeshHolder holder = res.asset as MeshHolder;
                if (holder != null)
                {
                    mesh = holder.Find(m_MeshName);
                }
            }

            if (m_PreLoader != null)
            {
                m_PreLoader.Recycle2Cache();
                m_PreLoader = null;
            }
        }
예제 #2
0
        public void SetMesh(string holderName, string meshName)
        {
            if (m_MeshHolderName == holderName)
            {
                m_MeshName       = meshName;
                m_MeshHolderName = holderName;

                if (m_MeshHolder != null)
                {
                    mesh = m_MeshHolder.Find(m_MeshName);
                }
            }
            else
            {
                m_MeshHolderName = holderName;
                m_MeshName       = meshName;

                LoadMesh();
            }
        }