/// <summary>
        /// Hides the content.
        /// </summary>
        public virtual void HideContent()
        {
            if (!IsContentVisible)
            {
                return;
            }

            IsContentVisible = false;
            ContentHidden.RaiseEvent();
        }
Пример #2
0
        /// <summary>
        /// Hides the content.
        /// </summary>
        public override void HideContent()
        {
            if (!IsContentVisible)
            {
                return;
            }

            var renderer = gameObject.GetComponent <Renderer>();

            if (renderer != null)
            {
                renderer.material.mainTexture = null;
            }

            IsContentVisible = false;
            ContentHidden.RaiseEvent();
        }