2022의 게시물 표시

Unity(Android Logcat) + Bluestacks(ADB) 사용한 디버깅 방법 (How to debug Unity APK App on Bluestacks)

이미지
Unity(Android Logcat) + Bluestacks(ADB) 사용한 디버깅 방법 How to debug Unity APK App on Bluestacks 유니티로 안드로이드 게임을 제작하는면서 블루스택과 연동해서 테스트와 디버깅을 하기 쉽게 하는 방법 다른 안드로이드 플레이어(LDPlayer, Nox.. etc)는 Hyper-V 관련 옵션을 끄라고 하던가, 윈도우 보안의 메모리 보안을 해제하라고 하던가 해서 왠지 찝찝해서 문제가 별로 없는 Bluestacks 를 사용하게 되었고 제일 나아 보여서 채택함 (제조한 국가가 중국, 코인채굴을 한다던가, 개인정보를 빼간다던가... 하는 소문이 있어서) 1) Bluestacks 설치 (5.9 버전 사용함), 설정에서 ADB 활성화 (portnum 3400 포트번호 확인해둘것) 2) Unity 에 Android Logcat 설치 (유니티 패키지 매니저에서 설치) 하고 창을 연다 (Window > Analysis > Android Logcat) 3) Unity 에서 APK 파일로 빌드 (안드로이드 .aab 말고 .apk 로 빌드) 4) Bluestacks 에 빌드한 APK 설치 (드래그 앤 드롭) 5) Bluestacks 에서 개발한 앱 실행 6) Logcat 에서 other connection options 선택 후 127.0.0.1:3400 (자신의 포트번호) 연결 7) 필터에 실행시킨 앱을 선택 (패키지명) => 로그를 확인 하면서 디버깅 가능~! 장점1. 로그를 확인하기 쉬워서 디버깅 하기가 좋음 장점2. 실제기기와 비슷한 환경에서 테스트 가능 (GPGS 테스트 가능) 장점3. USB 연결 불필요, APK 파일 전송이 간단함 + 설치, 실행이 빠름 P.S 포트번호가 5555로 고정되던 시절이 있었던거 같은데 사용한 버전(Bluestacks 5.9 버전)에서는 포트번호가 계속 바뀌는 이슈가 있음. => 현재 고정시키는 방법은 없는듯 하다 포트번호를 알아내는 방법1) Bluestacks&

Unity + GPGS 플러그인 v11.01 관련 삽질 기록(GPGS Unity Plugin v11.01 Error Solve)

이미지
Unity + Google Play Games Services 관련 삽질 기록 삽질한 개발환경 윈도우 11 유니티 GPGS 플러그인 버전 v11.01 유니티 버전 2020.3.36f1 https://github.com/playgameservices/play-games-plugin-for-unity Unity GPGS 플러그인(play-games-plugin-for-unity)을 사용해서 구현하다 발생한 삽질 기록 1. 플러그인 설치 후 resolve 오류 1) dependency 관련 오류 Failed to fetch the following dependencies: com.google.games:gpgs-plugin-support:0.11.01 해결방법 https://github.com/playgameservices/play-games-plugin-for-unity/issues/2796#issuecomment-1166347984 * Open the file Assets/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPluginDependencies.xml * change line `Packages/com.google.play.games/Editor/m2repository` to `Assets/GooglePlayGames/com.google.play.games/Editor/m2repository` * run Android Force Resolve => GooglePlayGamesPluginDependencies.xml 파일을 열어서 라인 편집 2) JAVA_HOME 관련 오류 ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java insta