본문 바로가기

전체 글183

23/09/04 LearnUGUI 버튼2 (배열로 관리) UIMain using System; using System.Collections; using System.Collections.Generic; using System.Text; using UnityEngine; using UnityEngine.UI; public class Test01UIMain : MonoBehaviour { public enum eButtonType { Blue, Red, Green, Purple } //[SerializeField] //private Button btnBlue; //[SerializeField] //private Button btnRed; //[SerializeField] //private Button btnGreen; //[SerializeField] //priv.. 2023. 9. 4.
23/09/04 LearnUGUI 버튼 배열 없이 버튼 클릭하여 출력해보기 UIMain using System; using System.Collections; using System.Collections.Generic; using System.Text; using UnityEngine; using UnityEngine.UI; public class Test01UIMain : MonoBehaviour { public enum eButtonType { Blue, Red, Green, Purple } [SerializeField] private Button btnBlue; [SerializeField] private Button btnRed; [SerializeField] private Button btnGreen; [SerializeField] .. 2023. 9. 4.
23/09/03 [주말] HeroShooter 총알 발사 지난 금요일에 배운 LoadAndSave 프로젝트가 Sourcetree에 잘 안올라가진 것 같다,,,ㅜㅜ 내일 다시 해봐야겠다! 주말에 그동안 HeroShooter 오류났던 것들 수정을 했다. - Hero가 Monster 감지할 때 Ray가 이상하게 나갔던 것 - 총알 발사할때 방향이 이상하게 나갔던 것 - 애니메이션 추가 등.. 그렇지만 역시나 이번에도 새로운 걸 하려보니 오류가 나 네^^,, 오류에 늪에서 벗어나려면 연습을 더 해야함을 느낀다... **오늘의 오류 - 총알 무한발사 (지난 번에 했던 코루틴 무한반복 방지 방법을 쓴 거 같은데도 무한 발사를 한다ㅜ ) Player using System.Collections; using System.Collections.Generic; using Sys.. 2023. 9. 3.
23/08/31 Input System 연습 4가지 방법 중에 send message 방법이 간단하고 좋은 것 같아서 그 방식으로 해보았다! WarriorController using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.InputSystem; public class WarriorController : MonoBehaviour { private Animator anim; private new Transform transform; private Vector3 moveDir; private void Start() { this.anim = this.GetComponent(); this.transform = this.GetCompo.. 2023. 8. 31.
23/08/30 HeroShooter 타이틀 (비동기 씬 전환) **비동기로 씬을 로딩하는 이유 : 동기로 씬을 가져올 경우 한 장면에 있는 모든 정보들을 불러오기 때문에 시간이 길어져서 사용자에게 불쾌한 경험을 줄 수 있음. 따라서 비동기적인 방법으로 씬을 로드함 App (App씬) using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; public class App : MonoBehaviour { private void Awake() { DontDestroyOnLoad(this.gameObject); } void Start() { //비동기 씬로드 AsyncOperation oper = SceneManager.Load.. 2023. 8. 30.
23/08/29 TestAreaMask TestMonster using System.Collections; using System.Collections.Generic; using Unity.VisualScripting; using UnityEngine; using UnityEngine.AI; public class TestMonster : MonoBehaviour { [SerializeField] private Transform target; private NavMeshAgent agent; private Animator anim; void Start() { this.agent = this.GetComponent(); this.anim = this.GetComponent(); //코루틴 실행 this.StartCoroutine(this.CoD.. 2023. 8. 29.