public void OnDestroy() { this.ClearStateMachine(); if (this.m_AvatarPreview != null) { this.m_AvatarPreview.OnDestroy(); this.m_AvatarPreview = null; } }