본문 바로가기

Study

(6)
맥북 에어에서 M1 유니티 VS Code 설정하기 (Macbook Air M1 Unity VS Code Setting) 정말 욕이 절로 나온다. 삽질을 해댔으니 나중을 위해 기록해둔다. *순서대로 해야 나중에 헷갈리지 않는다. https://code.visualstudio.com/ Visual Studio Code - Code Editing. Redefined Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications. Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows. code.visualstudio.com Visual Studio Code : S..
유니티 SNS 공유 빌드 에러 : android resource linking failed: unexpected element <queries> found in <manifest> https://assetstore.unity.com/packages/tools/integration/native-share-for-android-ios-112731 Native Share for Android & iOS | 기능 통합 | Unity Asset Store Use the Native Share for Android & iOS from yasirkula on your next project. Find this integration tool & more on the Unity Asset Store. assetstore.unity.com 순간적 캡처로 어디든 공유할 수 있는 에셋. 예시 코드만 작성하면 되었는데 갑자기 빌드 에러가 떴다. 개발자가 올려놓은 해결책은 그냥 안드로이드 11용 빌드 링크..
유니티 구글 플레이 게임 연동하기 (Unity GPGS Plugin) Build Settings에서 Android로 Switch Platform한다. (Build App Bundle 체크, Compression Method : LZ4HC) Player Settings에서 Anroid에 Publishing Settings의 Keystore Manager를 클릭 keystore를 생성하고, Alias는 user 4번의 Password를 입력한다. 예 - 쑤 구글 플레이 콘솔에서 앱 만들기를 눌러 앱을 하나 생성한다. 프로덕션에 빌드한 apk나 aab를 업로드한다. 기본 스토어 등록정보 내용을 임시로 채워준다. 스토어 설정도 설정한다. 콘텐츠 등급 설정 이 쪽도 전부 작성해준다. developer.thebackend.io/unity3d/guide/federationEx/gpgs..
유니티 스프라이트 해상도 대응 (Unity Sprite Resolution Devices) UI와 별개로 메인 카메라에 잡히는 스프라이트 위치도 분명 기기별 위치가 다르게 보이기 때문에 대응해줘야 한다. Sprite를 하나 생성해 Main Camera화면에 맞춰 Scale 값을 조절한다. (이 스프라이트가 기준점) 그리고, Sprite Renderer를 비활성화 시킨다. using System.Collections; using System.Collections.Generic; using UnityEngine; public class CameraResolution : MonoBehaviour { public SpriteRenderer rink; // Use this for initialization void Start() { float screenRatio = (float)Screen.width..
유니티 UI 노치 대응 (Unity UI Notch Devices) Package Manager에서 Advanced를 눌러 Show preview packages를 체크하고, Device Simulator를 설치한다. Game 탭을 눌러 Simulator로 변경한다. 디바이스별 화면을 확인할 수 있다. UI 테스트를 위해 이미지를 만들어 화면의 사이드에 배치한다. (* 반드시 Anchor와 Stretch를 설정해야 적용된다.) using System.Collections; using System.Collections.Generic; using UnityEngine; public class SafeArea : MonoBehaviour { RectTransform rectTransform; Rect safeArea; Vector2 minAnchor; Vector2 maxAn..
유니티 깃허브 세팅 (Unity Github) Repository는 Private으로 생성하고, README파일과 Ignore는 Unity로 설정하여 생성한다. 깃허브 데스크톱을 실행해 Clone a Repository를 눌러 깃허브 닷컴의 Repository의 프로젝트를 클론한다. (* 기존 유니티 프로젝트와 깃허브 프로젝트의 폴더명을 다르게 할 것) 복제를 하고, 기존 유니티 프로젝트의 내용물을 복제된 깃허브 프로젝트로 이동시킨다. 깃허브 데스크톱으로 돌아가면 추가된 파일들이 보인다. 메인 브랜치에 커밋한다. Push origin을 눌러 마무리.