Unity 240

[Addressable] Build Mode Script

Fast Mode - 번들로 만들어지지 않은 상태로 바로바로 플레이가 가능한 모드이다. 작업 중인 컴퓨터의 에셋 데이터베이스에서 바로바로 정보를 가져오기 때문에, 실제로 어드레서블에셋들이 그룹화되어있지 않다. ​ Virtual Mode - 플레이를 누르면 사전 빌드 단계를 거쳐서 그룹화된 번들 파일들을 생성한 후 플레이 된다. 따라서 실제 그룹화가 되어있고, 그 정보에서 데이터를 불러온다. 그래서 프로파일링 할 때 유용하다. 하지만 데이터가 계속해서 활성화되어 있기 때문에 실제 빌드 시 작동은 하지만 메모리에 이점이 전혀 없다. ​ Packed Play Mode - 실제 빌드를 통해 그룹화된 파일을 생성해야만 이 모드로 플레이(재생)가 된다. https://m.blog.naver.com/PostView...

[구글로그인] DEBUG: Authentication canceled

[Play Games Plugin 0.10.12] 02/27/22 1:00:07 +09:00 DEBUG: Authentication canceled 게임안에서 구글로그인 요청 시, 위 에러가 나며 구글 로그인이 안된다. 테스트용으로 새로운 구글 아이디를 만들었고, 폰에 apk를 설치해서 실행한 상태. 이 경우는 여기에 테스터로 등록이 안되어 있어서 그랬음. 참고 블로그 https://blog.naver.com/PostView.nhn?blogId=mms0801&logNo=222277972187&categoryNo=0&parentCategoryNo=57&viewDate=&currentPage=1&postListTopCurrentPage=1&from=postView [Unity][GooglePlay][GPGS..

Unity/Unity 이슈 2022.02.27

[Addressable] Update 과정

* Addressable 버전: 1.19.18 업데이트 전 상태 프로젝트 폴더/ServerData/Android uiassets Bundle은 3개나 있음. 변경사항이 있을 경우 새로 생긴다. 빨간색이 최신 Bundle이며, 파란색은 이전 Budle이다. 빨간색만 있으면 얘들은 필요없다. (수정날짜 참고) catalog_1.json을 보면 최신 번들인 빨간색 번들만 등록되어 있다. 변경 전의 catalog_1.hash의 값은 88f2b076515f861eb457dae76a5fe585 이다. 업데이트 및 빌드 테스트를 위해 uiaseets그룹의 prefab하나를 변경. (빨갛게 만들어버림) 저장하고 Build. 빌드 후의 상태 기존 파란색 대신 빨간색 번들이 하나 생겼다. 여기에 변경사항이 적용되어 있을것..

[Addressable] Update를 위한 Method

1.19.18 버전 공식문서 https://docs.unity3d.com/Packages/com.unity.addressables@1.19/manual/index.html DownloadDependenciesAsync 다운받을게 얼마나 있는지 확인 설명 https://docs.unity3d.com/Packages/com.unity.addressables@1.19/manual/DownloadDependenciesAsync.html 명세 https://docs.unity3d.com/Packages/com.unity.addressables@1.19/api/UnityEngine.AddressableAssets.Addressables.DownloadDependenciesAsync.html​ Sample Code ..

Exception: Reentering the Update method is not allowed. This can happen when calling WaitForCompletion on an operation while inside of a callback.

Problem GameObject loading = Addressables.InstantiateAsync("Assets/Addressable/UI/Loading/LoadingPrefab.prefab", parent).WaitForCompletion(); Exception: Reentering the Update method is not allowed. This can happen when calling WaitForCompletion on an operation while inside of a callback. Solution 검색해서 나오는 글들을 보면, Addressable자체 버그인듯 함. 그래서 어찌 해결할 방안이 없음. Coroutine(IEnumerator)안에서 WaitforComplete를..

Unity/Unity 이슈 2022.02.19

[Addressable] Catalog

요약 1. 버전을 유지한 채 에셋을 수정하고 Update a Previous Build를 한 다음, 결과물 Bundle만 업데이트 한다. 2. Addressable Group을 수정한 경우는 New Build를 하고 결과물 Build업데이트 + 유니티 코드 Build도 애야 한다.(추측) 3. Build Target이 Android면 Andrdoid 폴더가 생긴다. 다른 OS Targeting을 위해서는 Switch Platform을 해야한다고 한다. https://blog.naver.com/cdw0424/221756844361 유니티(Unity) - Addressable(어드레서블) 사용법(8). 서버에서 다운로드하기 2편[Catalog 이해] 이전 포스트에서 간단하게 카탈로그에 대한 설명을 하고 넘어..

Addressable 사용 시 Shader가 깨질 때(분홍색으로 나옴)

Problem Reason Addresssable의 Shader는 Android용으로 Pack되어서 Editor에서 안열리는 것 Solution Android에서는 잘 보이고, Editor에서 테스트 시에만 잘 안보이는 것. Reference http://cargocollective.com/mingruijiang/Shaders-from-asset-bundles-appear-pink-in-editor Shaders from asset bundles appear pink in editor - Mingrui Jiang, Programmer I came across this problem when testing asset bundles and organizing shaders. The problem is wei..

Unity/Unity 이슈 2022.02.14

Button에 AddListner에 함수를 넣어도 먹히지 않는 상황

Problem public void SetCancelClickListener(UnityAction listener) { cancelButton.onClick.AddListener(AAAA); cancelButton.onClick.AddListener(listener); } private void AAAA() { Debug.Log("#### AAAA()"); } // 다른 클래스에서 매개변수로 들어간 UnityAction(listener) private void SSSS() { Debug.Log("#### SSSS()"); } #### SSSS()는 찍히지만 #### AAAA()는 찍히지 않는다. 해당 AddListner라인만 쌩깜. Solution 해당 클래스는 Monobehabior이지만 new로 생성..

Unity/Unity 이슈 2022.02.13

Addressable 동기(Synchronized)로 구현

Resource로드하는 것처럼 동기로 구현할 수 있는 방법. WaitforCompletion() 매소드. 이 API는 어드레서블 패키지 1.17.4 버전부터 제공되며, Unity 2021.1, Unity 2020 LTS, Unity 2019 LTS와 호환 Example void Start() { //Basic use case of forcing a synchronous load of a GameObject var op = Addressables.LoadAssetAsync("myGameObjectKey"); GameObject go = op.WaitForCompletion(); //Do work... Addressables.Release(op); } // 바로 Instantiate할때도 사용가능 prefa..

Unity Addressable

https://planek.tistory.com/29?category=1129095 어드레서블 에셋 시스템 - 개념: Remote 서버 연동 Remote 서버 연동 CDN을 구축하기 위해 아마존 웹 서비스(AWS) S3를 사용해보자. https://aws.amazon.com/ko/getting-started/hands-on/backup-files-to-amazon-s3/ DNS이름을 지정하고 (예를들면 'study.mycdn... planek.tistory.com https://blog.naver.com/cdw0424/221755856111 유니티(Unity) - Addressable(어드레서블) 사용법(7). 서버에서 다운로드하기 1편 사실 서버 사용까지는 안 다룰 생각이었는데 메일로 오는 질문들이 거..