/// <summary>
        /// Sets the <see cref="ActiveButtonIndex"/> when a button is activate.
        /// </summary>
        /// <param name="data">The data to retrieve the button being activated.</param>
        protected virtual void SetActiveButtonIndexWhenButtonActivated(SurfaceData data)
        {
            SpatialTargetFacade spatialTarget = data.Transform.gameObject.TryGetComponent <SpatialTargetFacade>(false, true);

            if (spatialTarget == null)
            {
                return;
            }

            ignoreActiveButtonIndexChanges = true;
            ActiveButtonIndex = ButtonList.IndexOf(spatialTarget.gameObject);
            ignoreActiveButtonIndexChanges = false;
        }
        /// <summary>
        /// Subscribes to the <see cref="SpatialTargetFacade.Activated"/> event.
        /// </summary>
        /// <param name="obj">The object containing the <see cref="SpatialTargetFacade"/>.</param>
        public virtual void SubscribeButtonActivated(Object obj)
        {
            SpatialTargetFacade spatialTarget = (obj as GameObject).GetComponent <SpatialTargetFacade>();

            spatialTarget.Activated.AddListener(SetActiveButtonIndexWhenButtonActivated);
        }