UNITY/Unity Study45 이미지버튼 이미지가 안들어갈때(png파일) 이미지 클릭하고 디폴트값을 'Sprite (2D and UI)'로 바꾸기 2023. 6. 23. UI버튼 큐브 색 바꾸기 큐브하나 랜덤으로 색 바꾸기 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class CubeColorChanger : MonoBehaviour { public GameObject cube; private Button button; private void Start() { button = GetComponent(); button.onClick.AddListener(ChangeCubeColor); } private void ChangeCubeColor() { Renderer cubeRenderer = cube.GetComponent(); cubeRenderer... 2023. 6. 22. 도서관 만들기 유니티 에셋 배치 2023. 6. 14. 이전 1 ··· 5 6 7 8 다음