public void OnDestroy() { if (context.ClusterCount > 0 && context.VertexCount > 0) { MCRRenderer.RemoveFromRenderList(this); context.Destroy(); context = null; } }
public void Awake() { if (context.ClusterCount > 0 && context.VertexCount > 0) { context.Init(this); if (Application.platform == RuntimePlatform.WindowsEditor || Application.platform == RuntimePlatform.WindowsPlayer) { MCRResourcesSystem.LoadMCRBakeAsset(context); } MCRRenderer.AddToRenderList(this); } }