게임엔진

    [Unity] 플랫폼별 컴파일 (전처리기)

    [유니티 C# 강좌] 16. 전처리기 지시어(Preprocessor Directive) (tistory.com)

    [Unity] 레이어 소팅레이어 태그 설정

    #8 Unity 레이어 소팅레이어 태그 설정 (tistory.com)

    [Unity] CSV 파일 저장, 불러오기 Read, Write 간단 사용법

    파일 저장 경로 불러오는 코드 작성 using System.IO; using UnityEngine; public static class SystemPath { public static string GetPath(string fileName) { string path = GetPath(); return Path.Combine(GetPath(), fileName); } public static string GetPath() { string path = null; switch (Application.platform) { case RuntimePlatform.Android: path = Application.persistentDataPath; path = path.Substring(0, path.LastInde..

    [Unity] Visual Studio에서 디버깅 연결이 되지 않는 경우

    External Script Editor에서 Visual Studio가 선택 항목에 있는 경우 Unity Editor 상단 Edit → Preferences → External Tools → External Script Editor를 Visual Studio로 설정 External Script Editor에서 Visual Studio가 선택 항목에 없는 경우 External Script Editor에서 Browse → C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE → devenv.exe 파일 선택 이렇게 다 Visual Studio를 연동을 했는데도 유니티 디버깅 모드를 사용할 수가 없었다. Visual Studio Install..

    [Unity] Resources.LoadAll로 리소스 파일 전체 불러오기

    유니티에서 서브 디렉토리를 만들 때 특정 이름으로 만들면 특별한 작동을 한다 Resources라는 이름의 폴더가 있다면, 그 폴더 안의 리소스를 불러오는 함수를 쓸 수 있다 Resources 폴더를 새로 만들어서 안에 이미지 파일을 넣었다 테스트를 위한 버튼 하나를 만들어서 스크립트를 붙였다 public class Box1Manager : MonoBehaviour { object[] sprites; // Start is called before the first frame update void Start() { sprites = Resources.LoadAll("1_LikeLove"); for (int i = 0; i < sprites.Length; i++) { GameObject go = sprites..

    [Unity] UniTask VS Task (UniTask 개념 포함)

    https://github.com/Cysharp/UniTask GitHub - Cysharp/UniTask: Provides an efficient allocation free async/await integration for Unity. Provides an efficient allocation free async/await integration for Unity. - GitHub - Cysharp/UniTask: Provides an efficient allocation free async/await integration for Unity. github.com 왜 UniTask를 사용해야 할까? 1. 코루틴으로 관리하기에는 try-catch로 예외처리를 할 수가 없다. 2. 코루틴은 return 타입..

    [Unity] Coroutine 과 UniTask 비교 예제

    UniTask 는 async 와 await 를 유니티에서 더 사용하기 편리하도록 만든 통합 패키지다. UniTask 는 Coroutine 에 비해 메모리 사용량, 성능, try-catch 사용 가능 및 return 을 사용할 수 있어서 Coroutine 대신 UniTask 를 이용하도록 권장하고 있는 상황이다. 설치 UniTask 는 기본으로 지원되는 기능이 아니기 때문에 Package Manager 를 이용해 설치해줘야 한다. Package Manager 를 실행하고 위와 같이 [Add package from git URL...] 을 선택하고 나타나는 주소입력 창에 아래의 주소를 입력하고 [Add] 버튼을 클릭한다. https://github.com/Cysharp/UniTask.git?path=src/..

    [Unity] Mathf

    #6 Unity Mathf (tistory.com)

    [Unity] Vector2

    #5 Unity Vector2 (tistory.com)

    [Unity] Tranform 컴포넌트

    #5 Transform 컴포넌트 (tistory.com)