public void Cleanup() { m_texture2D = null; m_sprite = null; m_renderTexture = null; m_targetBounds = default(Bounds); if (m_container != null) { UIModuleModelUtils.UnRegisterTargetContainer(this); DestroyImmediate(m_container.gameObject); m_container = null; } }
void OnDestroy() { UIModuleModelUtils.UnRegisterTargetContainer(this); }