UI3 팝업만들기 홈에서 을 클릭하면 이 뜬다 에서 닉네임을 3자 이상으로 입력하면 이 활성화 된다. 홈이름을 똑같이 입력하면 이 뜬다. 을 누르면 홈 닉네임이 변경된다. Home Mainusing System.Collections; using System.Collections.Generic; using UnityEngine; public class HomeMain : MonoBehaviour { public UIHome uiHome; public UIpopupName uiPopupNickname; public ErrorPopup errorPopup; void Start() { //UIHome에 있는 닉네임 버튼을 누르면 this.uiHome.btnNickname.onClick.AddListener(() => { //팝업.. 2024. 2. 9. 스위치버튼, 탭 메뉴 UI 만들기 UI 구조 Scene Main >> UI Component >> Button / Text / Image 등등 ON OFF 스위치 버튼 만들기 using System.Collections; using System.Collections.Generic; using UnityEngine; public class UISwichButton : MonoBehaviour { [SerializeField] private GameObject onGo; [SerializeField] private GameObject offGo; bool isOn = false; // 비활성화 private void Start() { onGo = transform.GetChild(0).gameObject; offGo = transform.G.. 2024. 2. 6. SwipeCar Car using System.Collections; using System.Collections.Generic; using UnityEngine; public class CarController : MonoBehaviour { [SerializeField] private float attenAttenuation = 0.96f; [SerializeField] private float divied = 500f; private float speed = 0; private Vector3 startPosition; void Update() { if (Input.GetMouseButtonDown(0)) { //화면을 터치한 위치 가져오기 Debug.Log(Input.mousePosition); this.start.. 2024. 1. 28. 이전 1 다음