유니티 심화 86

SaveAndLoad - 캐릭터 프리팹 인스턴스화하기

https://jsonviewer.stack.hu/ Online JSON Viewer jsonviewer.stack.hu https://shancarter.github.io/mr-data-converter/ Mr. Data Converter shancarter.github.io App using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class App : MonoBehaviour { //프리팹이 저장될 변수 private List prefabs = new List(); [SerializeField] private Butto..

유니티 심화 2023.09.01

[복습] 동기/ 비동기

새프로젝트에서 안보고 복습 해봤는데 처음에 뭔가 App이 사라져서 DontDestroyOnLoad를 추가하지 않은걸 알게되었다. using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; public class App : MonoBehaviour { //동기 비동기 //App에 TestMain과 GameMain을 얻어온다. private void Awake() { DontDestroyOnLoad(this.gameObject); } private void Start() { this.ChangeScene(); } private void ChangeScene() { ..

HeroShooter - 오브젝트 풀링[총알], 비동기[씬 전환]

1. 총알 오브젝트 풀링 BulletPoolMain에 SetParent로 총알 SetActive(false) 상태로 해놓고 사용할 때 바깥으로 꺼내서 SetActive(true) 상태로 변경 몬스터한테 맞았을 때 SetActive(false) 변경하고 SetParent를 BulletPoolMain으로 변경 1-1. 총알 BulletPoolMain에 넣어두기 --> 총알을 알아야지 [완] 1-2. 총알 Destroy될 때 Release 해주기 2. 씬들 비동기 [완] 3. App, Title [완] 해야할 일 ㅡ> 플레이어가 총을 쏘는건 아니다 플레이어가 애니메이션으로 어택을 하면 메인에다가 알려줘서 총을 쏘고 메인은 Pool에서 총을 빌려온다. BulletPoolManager using System.Co..

유니티 심화 2023.08.30