public bool Activate(IUiNameKeySource newSource)
        {
            Debug.Log("TEST: Name key browser opened.");

            // Sending a null source or retransmitting the previous source is interpreted as a command to abort:
            if (newSource == null || newSource == activeSource)
            {
                Deactivate();
                return(true);
            }

            // Store the source of the current query:
            activeSource = newSource;

            // Enable this GO:
            gameObject.SetActive(true);

            // Reset browser states:
            ResetStates();

            // Update UI contents:
            UpdateContents();

            isActive = true;
            if (environment != null)
            {
                environment.NotifyPopupActivityChanged(this);
            }

            return(true);
        }
        public void Deactivate()
        {
            gameObject.SetActive(false);

            currentSelectionIndex = -1;
            activeSource          = null;
            isActive = false;

            if (environment != null)
            {
                environment.NotifyPopupActivityChanged(this);
            }
        }