Unity

    VSCode에서 자동정렬이 되지 않는 이슈

    🟦 이슈새 프로젝트를 판 후 스크립트를 작성하고 저장을 했는데 자동정렬이 되지않음.설정에 들어가서 확인해도 "format on save"가 활성화되어있음.VSCode를 껐다 킬 때 아래와 같은 팝업이 떠서 문제를 파악함.The version of the Unity Package 'Visual Studio Editor' is too old. Please update to version 2.0.20 or later in Unity's Package Manager. 🟧 해결방법- Visual Studio Editor 패키지 버전이 최신이 아니라서 발생한 이슈였음.   - Unity 실행 후 Package Manager 띄움- Visual Studio Editor 업데이트

    Unity Project Junction

    🟦 Unity Project Junction빌드하기 위해 플랫폼을 변경해야할 때 프로젝트 크기가 커질수록 변환하는 시간이 길어진다.이럴 때 Junction을 이용하면 플랫폼을 변경하지 않아도 된다. 멀티를 지원하는 프로젝트를 테스트하는 경우에도 Juction을 이용하면 편리하다.   🟧 사용법// gist by Roystan (IronWarrior): https://gist.github.com/IronWarrior/005f649e443bf51b656729231d0b8af4// Video demo: https://twitter.com/DavigoGame/status/1300842800964018178//// CONTRIBUTIONS:// Mac and Linux support a..

    레이아웃 재정렬

    🟦 레이아웃 재정렬 Horizontal Layout Group, Vertical Layout Group 등의 컴포넌트를 이용해 UI를 구성한 다음 프리팹을 생성하면 정렬이 안되는 경우가 종종 있다. 그럴 때 강제로 재정렬해주는 코드이다. 🟧 Document LayoutRebuilder.ForceRebuildLayoutImmediate() WaitForEndOfFrame() 🟧 코드 public void RebuildLayout(RectTransform _obj) { StartCoroutine(nameof(CorRebuildLayout), _obj); } IEnumerator CorRebuildLayout(RectTransform _obj) { yield return new WaitForEndOfFrame..

    [유니티 Json 파싱] Newtonsoft.Json & Unity JSON Utility

    🟦 Newtonsoft.Json 🟧 Document 참고영상 : 베르의 게임 개발 유튜브 https://docs.microsoft.com/ko-kr/dotnet/standard/serialization/system-text-json-how-to?pivots=dotnet-5-0 C#을 사용하여 JSON을 직렬화 및 역직렬화하는 방법 - .NET System.Text.Json 네임스페이스를 사용하여 .NET에서 JSON으로 직렬화 및 역직렬화하는 방법을 알아봅니다. 샘플 코드가 포함되어 있습니다. docs.microsoft.com 🟧 Settings https://www.newtonsoft.com/json - 링크 접속 후 Download 버튼 클릭 - Json.NET 버튼 클릭 - 최신 버전의 zip파일 ..

    Unity VScode Debugging

    🟦 Unity VScode Debugging visual studio와 달리 디버깅을 위해서는 extention과 설정을 해주어야 한다. 🟧 Settings - C#, Debugger for Unity, Unity Tools 3가지를 다운받는다. - 왼쪽에 벌레모양 아이콘을 클릭한다. - create a launch.json file 클릭 - Unity Debugger 클릭 더보기 { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid..

    Animation Rigging

    🟦 Animation Rigging - 모델에 애니메이션이 들어가면 플레이상태에서 모델의 rig 구조를 컨트롤 할 수 없음 - Animation Rigging 패키지를 사용하면 애니메이션 상태에서도 컨트롤 할 수 있음 🟧 Document https://docs.unity3d.com/Packages/com.unity.animation.rigging@1.2/manual/constraints/MultiAimConstraint.html Multi-Aim Constraint | Animation Rigging | 1.2.0 Multi-Aim Constraint A Multi-Aim Constraint rotates a Constrained Object to face a target position specifie..

    에러 : A failure occurred while executing

    🟦 상황 빌드하려는데 아래와 같은 팝업창이 뜸 🟧 에러메세지 🟦 해결방법 - Project Settings / Player / Publishing Settings - Keystore Password를 정확하게 입력해야함

    에러 : JDK directory is not set or invalid.

    🟦 상황 빌드를 하려는데 팝업창이 뜨며 빌드가 되지않음. 🟧 에러메세지 Java Development Kit (JDK) directory is not set or invalid. Please, fix it in Preferences -> External Tools 🟦 해결방법 - Unity Hub 열기 - Installs 클릭 - 설정 버튼 클릭 - Add modules 클릭 - 원래는 OpenJDK 앞에 체크박스가 있음. 체크하기 - Install 버튼 클릭