목록유니티 기초 (8)
아카이브

스크립트 Test_BossMain using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace Test_Boss { public class Test_BossMain : MonoBehaviour { [SerializeField] private Button btnMove; [SerializeField] private Button btnRemove; [SerializeField] private Bull bull; [SerializeField] private Transform targetTrans; //비활성화 [SerializeField] priva..

페이드 아웃 만들기 스크립트 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Test_FadeOutMain : MonoBehaviour { [SerializeField] private Image dim; // Start is called before the first frame update void Start() { this.StartCoroutine(this.FadeOut()); } private IEnumerator FadeOut() { Color color = this.dim.color; //점점 어두워지게 while (true) { color...

프리팹 생성 시 바로 부모를 설정하는 경우와 프리팹 인스턴스를 생성한 뒤에 부모를 설정하는 경우의 차이 Test_EquipItemMain.cs using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Test_EquipItemMain : MonoBehaviour { [SerializeField] private Button btnRemoveSword; [SerializeField] private Button btnRemoveSword0; [SerializeField] private Button btnRemoveSword1; [SerializeField] priv..

Test_CreateMonster 오브젝트와 스크립트를 만든다 Test_CreateMonster 스크립트 using System.Collections; using System.Collections.Generic; using UnityEngine; public class Test_CreateMonster : MonoBehaviour { [SerializeField] private GameObject prefab; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { if (Input.GetMouseButtonDown(0)) { //좌클릭한 화면의 픽셀좌..