728x90 버튼2 Unity & C# ~ Button Sprite Swap Scirpt Controller using System.Collections; using UnityEngine; using UnityEngine.UI; public class HUD_ButtonController : MonoBehaviour { [SerializeField] Sprite defaultSprite; [SerializeField] Sprite selectedSprite; [SerializeField] Sprite pressedSprite; [SerializeField] Sprite highlightSprite; Image thisImage; bool isPress = false; bool IsPress { get { return isPress; } set { isPress = value; } } private const f.. 2022. 5. 31. Unity & C# ~ 리모트 버튼에서 스킵 버튼을 눌렀을 때 동작 Coroutine skipCoroutine = null; EventSystem = eventSystem; void Start() { eventSystem = GameObject.Find("EventSystem").GetComponent(); } void SkipFunc() { PlayBT.image.sprite = playSelectedImg; //플레이버튼 선택 이미지 PauseBT.image.sprite = pauseDefaultImg; //일시정지버튼 비활성화 이미지 if (skipCoroutine == null) { skipCoroutine = StartCoroutine("SkipCoroutineFunc"); } else if(skipCoroutine != null) { StopCoroutine(.. 2022. 5. 31. 이전 1 다음 SMALL