유니티 에디터로도 물론 Ui창 크기를 테스트 해볼 수 있지만, 실제 폰에서 어떤지 궁금할 때가 많다. 실제 서비스하다보면, 일부 폰에서 ui가 깨진다는 소릴 듣곤한다. 하지만 안드스튜디오 처럼, 시뮬레이터나, 애뮬레이터 기능이 없어, 테스트 해보기 애매했었는데, 유니티에 시뮬레이터 기능이 있다는 것을 듣고 사용해 보게 됐다. 패키지 매니저로 들어가서, Device로 검색해, Device Simulator를 설치하도록 하자. 설치 후 -> Window -> General -> Deive Simulator가 있을 것이다. 실행하면 아래와 같이 창이 뜬다. 원하는 기기 종류를 선택해 Play버튼을 누르면, 기존 Game창이 아닌 시뮬레이터 창에서 실행되는 것을 볼 수 있다.
Unity는 Google Play 스토어의 여러 게임에서 사용되는 크로스 플랫폼 게임 엔진입니다. Unity의 모듈식 도구를 사용하면 몰입도가 높은 2D 또는 3D 모바일 게임을 만들어 제공할 수 있습니다. Android용 Unity 게임을 만드는 단계Unity를 사용하여 Android에서 플레이어를 위한 게임 환경을 만들려면 다음 단계를 따르세요.
Unity용 Google 공식 패키지 다운로드developers.google.com/unity에서 Unity용 Google 공식 패키지를 다운로드할 수 있습니다. Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates. Last updated 2022-07-13 UTC. [{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"필요한 정보가 없음" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"너무 복잡함/단계 수가 너무 많음" },{ "type": "thumb-down", "id": "outOfDate", "label":"오래됨" },{ "type": "thumb-down", "id": "translationIssue", "label":"번역 문제" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"샘플/코드 문제" },{ "type": "thumb-down", "id": "otherDown", "label":"기타" }] [{ "type": "thumb-up", "id": "easyToUnderstand", "label":"이해하기 쉬움" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"문제가 해결됨" },{ "type": "thumb-up", "id": "otherUp", "label":"기타" }] 민프[Unity] [Android][Unity] 안드로이드와 유니티를 연동시켜보자(feat.Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x0)민프야 2021. 9. 23. 19:37 안드로이드 버튼을 눌렀을때 유니티로 접속이 될 수 있게 연동해보자!! https://www.youtube.com/watch?v=sf54tOAkmzU&t=301s 해당 영상을 참고해서 작성하였습니다. 🎈유니티 - Build Settings - 안드로이드 추가먼저 유니티에서 안드로이드가 빌드될 수 있도록 Build Setting을 해주자 안드로이드 빌드 추가가 되면 이렇게 빌드 해주고 해당하는 버전에서 🎈유니티 - Player Settings - Export유니티를 Export해주기전에 몇몇 세팅값을 변경해주자! 이렇게 해주고 Export를 누르면 어느 파일에 저장할 것인지 나올텐데 🎈유니티 - unityLibrary 파일 안드로이드 프로젝트 파일에 올리기Export된 파일을 들어가면 안드로이드 프로젝트에 넣어주면 된다. 🎈안드로이드- Gradle 설정Gradle설정은 공식홈페이지에 나와있는대로 해주면된다. https://forum.unity.com/threads/integration-unity-as-a-library-in-native-android-app-version-2.751712/ Integration Unity as a library in native Android app Version 2 This document explains how to include Unity as a Library into standard Android application through Activity. You can read more about Unity as a... forum.unity.com * 첫번째 네모 친 칸에서 이렇게 해주면 내 프로젝트에 unitiLibrary 폴더가 생성된다. 🎈안드로이드 - ActivityMainActivity.xml
UnityHandlerActivity.xml
MainActivity.java
UnityHandlerActivity.java
이렇게 해주고 실행시켜주면 Run을 해주면 오류가 발생된다. 🚩 Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x0이건
넣어주고 실행하면 잘 작동되는 것을 확인할 수 있다. |