Пример #1
0
        public override void UpdateView()
        {
            string imageKey = Prefix + GetValue <string>();
            Sprite sprite   = SpriteExtensions.GetSpriteFromResource(imageKey);

            if (ImageField != null)
            {
                ImageField.sprite = sprite;
            }
        }
Пример #2
0
        public override void UpdateView()
        {
            string propertyValue = GetValue <string>();

            if (string.IsNullOrEmpty(propertyValue))
            {
                return;
            }

            string imageKey = Prefix + GetValue <string>();
            Sprite sprite   = SpriteExtensions.GetSpriteFromResource(imageKey);

            if (Image != null)
            {
                Image.sprite = sprite;
            }
        }