Esempio n. 1
0
    private void OnDestroy()
    {
        if (m_initialized)
        {
            m_BatchRendererGroup.RemoveBatch(m_batchID);
            if (m_material)
            {
                m_BatchRendererGroup.UnregisterMaterial(m_materialID);
            }
            if (m_mesh)
            {
                m_BatchRendererGroup.UnregisterMesh(m_meshID);
            }

            m_BatchRendererGroup.Dispose();
            m_GPUPersistentInstanceData.Dispose();
            m_sysmemBuffer.Dispose();
        }
    }