void OnDisable() { if (!keepMaterial) { material = null; } else if (mPanel != null) { mPanel.RemoveWidget(this); } mPanel = null; }