블로그 이미지
Every unexpected event is a path to learning for you.

카테고리

분류 전체보기 (2702)
Unity3D (793)
Programming (471)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (224)
협업 (57)
3DS Max (3)
Game (12)
Utility (136)
Etc (96)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (50)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday
12-08 12:53

달력

« » 2023.12
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31

공지사항

최근에 올라온 글

반응형

[링크] https://j2su0218.tistory.com/503

 

[유니티Unity]유니티에서 인앱 업데이트 지원 하기

유니티에서 인앱 업데이트 지원 하기 구글 콘솔에 새로운 버전을 업데이트했을 때, 인앱 업데이트 기능을 넣어주지 않으면 사용자가 직접 앱을 업데이트시켜주어야 한다. 하지만 중요한 기능의

j2su0218.tistory.com

 

반응형
Posted by blueasa
, |
반응형

 

[iOS] https://www.eyes.co.kr/mohae/mohae_view/547

 

아이즈모바일

아이폰 쓰는 사람 중에 인앱 광고 특히 게임 같은 거 할 때 저처럼 인앱 광고 많이 나와서 하기 싫은 사람들 있을 거예요 저는 아이가 좋아하는 무한의 계단이나 애니팡하는데 두세 판마다 인앱

www.eyes.co.kr

 

[Android] https://m.enuri.com/knowcom/detail.jsp?kbno=1335653&bbsname=nuri 

 

안드로이드폰 광고차단 꿀팁(옆동네발) - 에누리 쇼핑지식 자유게시판

에누리 자유게시판 - [안드로이드9버전 부터 가능] '설정 - 연결 - 기타연결설정' 들어가시면 프라이빗 DNS (혹은 비공개 DNS)가 있습니다. 여기에 'dns.adguard.com' 추가하시면

m.enuri.com

 

 
반응형
Posted by blueasa
, |
반응형

With recent Unity versions (2020, 2021 and 2022) Flutter Android builds will take a lot longer, because it also has to compile the IL2CPP code from Unity.

From the Readme:

  • Android builds takes forever to complete Unity 2022.1.*, remove these lines from unityLibrary/build.gradle filecommandLineArgs.add("--enable-debugger")
    commandLineArgs.add("--profiler-report")
    commandLineArgs.add("--profiler-output-file=" + workingDir + "/build/il2cpp_"+ abi + "_" + configuration + "/il2cpp_conv.traceevents")

Here is some testing to check how to speed things up.

Unity settings

IL2CPP Code Generation

  • Build Settings -> IL2CPP Code Generation: select Faster (smaller) builds instead of Faster runtime.
  • Or C# EditorUserBuildSettings.il2CppCodeGeneration = UnityEditor.Build.Il2CppCodeGeneration.OptimizeSize;

C++ compiler configuration

  • In Player settings -> Other settings -> configuration, select Debug.
  • Or C# PlayerSettings.SetIl2CppCompilerConfiguration(BuildTargetGroup.Android, Il2CppCompilerConfiguration.Debug);

Disable script debugging

Don't bother setting this in the Unity settings, it will be overridden by the build script.
Assets/FlutterUnityIntegration/Editor/build.cs
In the function DoBuildAndroid() remove the line enabling script debugging.
playerOptions.options = BuildOptions.AllowDebugging;
This is the same as removing commandLineArgs.add("--enable-debugger") from the build.gradle file after an export.

Measuring results

When you run a Flutter build, there are multiple IL2CPP stages that report their duration, with 2 sections taking far longer than all others.
We can compare these build durations when using different settings in Unity.

Log of the slow armv7 and arm64 sections

Starting: Z:\fuw20221.1.0+7\2021\example\android\unityLibrary\src\main\Il2CppOutputProject\IL2CPP\build\deploy\bee_backend\win-x64\bee_backend.exe --profile="Z:/fuw20221.1.0+7/2021/example/android/unityLibrary/build/il2cpp_armeabi-v7a_Release/il2cpp_cache/buildstate/backend_profiler1.traceevents" --stdin-canary --dagfile="Z:/fuw20221.1.0+7/2021/example/android/unityLibrary/build/il2cpp_armeabi-v7a_Release/il2cpp_cache/buildstate/bee.dag" --continue-on-failure --dagfilejson="Z:/fuw20221.1.0+7/2021/example/android/unityLibrary/build/il2cpp_armeabi-v7a_Release/il2cpp_cache/buildstate/bee.dag.json" FinalProgram
WorkingDir: Z:/fuw20221.1.0+7/2021/example/android/unityLibrary/build/il2cpp_armeabi-v7a_Release/il2cpp_cache/buildstate
ExitCode: 0 Duration: 2m:04s
Build succeeded with 553 successful nodes and 0 failed ones

Starting: Z:\fuw20221.1.0+7\2021\example\android\unityLibrary\src\main\Il2CppOutputProject\IL2CPP\build\deploy\bee_backend\win-x64\bee_backend.exe --profile="Z:/fuw20221.1.0+7/2021/example/android/unityLibrary/build/il2cpp_arm64-v8a_Release/il2cpp_cache/buildstate/backend_profiler1.traceevents" --stdin-canary --dagfile="Z:/fuw20221.1.0+7/2021/example/android/unityLibrary/build/il2cpp_arm64-v8a_Release/il2cpp_cache/buildstate/bee.dag" --continue-on-failure 
--dagfilejson="Z:/fuw20221.1.0+7/2021/example/android/unityLibrary/build/il2cpp_arm64-v8a_Release/il2cpp_cache/buildstate/bee.dag.json" FinalProgram
WorkingDir: Z:/fuw20221.1.0+7/2021/example/android/unityLibrary/build/il2cpp_arm64-v8a_Release/il2cpp_cache/buildstate
ExitCode: 0 Duration: 2m:03s
Build succeeded with 553 successful nodes and 0 failed ones
 

Results

The exact durations here aren't important, as this will be different of every computer and project setup.
This is after flutter clean and a fresh Unity export. Any subsequent runs will be faster because of caching.

Flutter build apk, with an export from Unity 2021.3.5f1 in android/unityLibrary on Windows 10.

Settingarmv7 durationarm64 duration

example project 2m:04s 2m:03s
1 - Code generation (faster builds) 1m:41s 1m:38s
2 - Compiler configuration (debug) 45s 43s
3 - No script debugging 30s 30s
1 + 2 35s 34s
1 + 2 + 3 23s 25s

Conclusion

My advice is to add this to the build script in DoBuildAndroid() for any test or debug builds, remove it for final release builds.

//Assets/FlutterUnityIntegration/Editor/build.cs
bool isReleaseBuild = false;

#if UNITY_2022_1_OR_NEWER
    PlayerSettings.SetIl2CppCompilerConfiguration(BuildTargetGroup.Android, isReleaseBuild ? Il2CppCompilerConfiguration.Release : Il2CppCompilerConfiguration.Debug);
    PlayerSettings.SetIl2CppCodeGeneration(UnityEditor.Build.NamedBuildTarget.Android, UnityEditor.Build.Il2CppCodeGeneration.OptimizeSize);
#elif UNITY_2021_2_OR_NEWER
    PlayerSettings.SetIl2CppCompilerConfiguration(BuildTargetGroup.Android, isReleaseBuild ? Il2CppCompilerConfiguration.Release : Il2CppCompilerConfiguration.Debug);
    EditorUserBuildSettings.il2CppCodeGeneration = UnityEditor.Build.Il2CppCodeGeneration.OptimizeSize;
#endif
 

If it doesn't affect your workflow, disable script debugging.

// playerOptions.options = BuildOptions.AllowDebugging;

And if you are developing on an arm64 device anyway, temporarily remove the armv7 build target from the Unity player settings.

 

 

[출처] https://github.com/juicycleff/flutter-unity-view-widget/issues/643

 

[Android] Tips to reduce android build times. · Issue #643 · juicycleff/flutter-unity-view-widget

With recent Unity versions (2020, 2021 and 2022) Flutter Android builds will take a lot longer, because it also has to compile the IL2CPP code from Unity. From the Readme: Android builds takes fore...

github.com

 

반응형
Posted by blueasa
, |
반응형

[추가] 2023-07-20

Unity 2022.3.5f1에서 이슈 해결된 것 확인함

(몇 버전부터 해결된건지는 확인 못함)

 

--------------------------------------------------

Unity 2022.2.18f1

Firebase 10.7.0

----

 

[빌드에러 #1]

> Configure project :unityLibrary
Build was configured to prefer settings repositories over project repositories but repository 'maven' was added by build file 'unityLibrary\build.gradle'


...

 

[빌드에러 #2]

Execution failed for task ':launcher:checkReleaseDuplicateClasses'.
> Could not resolve all files for configuration ':launcher:releaseRuntimeClasspath'.


-------------------------------------------------------------------------------------------------------------

 

 

Unity 2021에서 Unity 2022로 포팅하는 중에 위와 같은 빌드 에러가 떠서 찾아보니

Gradle 관련 Unity 2022 버그가 있는 것 같다.

 

[수정]

[참조] 링크 내용대로 아래와 같이 Gradle을 수정하고 정상적으로 빌드 되는 걸 확인 함.

간단히 정리하면 settingsTemplate.gradle에 있던 걸 baseProjectTemplate.gradle로 옮겨야 한다.

-------------------------------------------------------------------------------------------------------------

256p commented on Jan 24

Also, there is another workaround that keeps the Gradle version (in case some android lib requires it).
For that workaround, you will need to copy a file from /Applications/Unity/Hub/Editor/2022.2.3f1/PlaybackEngines/AndroidPlayer/Tools/GradleTemplates/settingsTemplate.gradle to Assets/Plugins/Android/settingsTemplate.gradle. That way Unity will use your template in Assets/Plugins/Android. (It's weird that Unity doesn't has a checkbox for that)
For my version of unity, it looks like that:

 

[Before] ../Assets/Plugins/Android/settingsTemplate.gradle

pluginManagement {
    repositories {
        **ARTIFACTORYREPOSITORY**
        gradlePluginPortal()
        google()
        mavenCentral()
    }
}

include ':launcher', ':unityLibrary'
**INCLUDES**

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
    repositories {
        **ARTIFACTORYREPOSITORY**
        google()
        mavenCentral()
        flatDir {
            dirs "${project(':unityLibrary').projectDir}/libs"
        }
    }
}

 

The conflicting part is RepositoriesMode.PREFER_SETTINGS. But you can safely delete the whole dependencyResolutionManagement block from here. Since the android project still needs to know about local dependencies, copy the repositories block, you will need it later.
Now settingsTemplate.gradle should look like this:

 

[After] ../Assets/Plugins/Android/settingsTemplate.gradle

pluginManagement {
    repositories {
        **ARTIFACTORYREPOSITORY**
        gradlePluginPortal()
        google()
        mavenCentral()
    }
}

include ':launcher', ':unityLibrary'
**INCLUDES**

------------------------------------------------------------------------------------------------------------------------------------------

Now in Project Settings > Player > Publishing Settings for Android enable Custom Base Gradle Template
Initially, it will look like that:

 

[Before] ../Assets/Plugins/Android/baseProjectTemplate.gradle

plugins {
    id 'com.android.application' version '7.1.2' apply false
    id 'com.android.library' version '7.1.2' apply false
    **BUILD_SCRIPT_DEPS**
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

 

Now create allprojects block and paste repositories copied in the settings template. As a result base template will look like that:

 

[After] ../Assets/Plugins/Android/baseProjectTemplate.gradle

plugins {
    id 'com.android.application' version '7.1.2' apply false
    id 'com.android.library' version '7.1.2' apply false
    **BUILD_SCRIPT_DEPS**
}

allprojects {
    repositories {
        **ARTIFACTORYREPOSITORY**
        google()
        mavenCentral()
        flatDir {
            dirs "${project(':unityLibrary').projectDir}/libs"
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

 

Now Gradle should build successfully.

 

-------------------------------------------------------------------------------------------------------------

 

[참조] https://github.com/googlesamples/unity-jar-resolver/issues/594

 

[Bug] Android Gradle project repositories block don't work for the latest Unity versions · Issue #594 · googlesamples/unity-ja

[REQUIRED] Please fill in the following fields: Unity editor version: 2022.2.2f1 External Dependency Manager version: 1.2.175 Source you installed EDM4U: .unitypackage Features in External Dependen...

github.com

 

 

반응형
Posted by blueasa
, |
반응형

 [링크] http://lancekun.com/blog/?p=599

 

안드로이드 Gradle / IL2CPP 환경에서 프로세스 남는 현상 – 랜스군의 게임공작소

유니티2018.3.12 에서gradle로 빌드시에 Application.Quit 으로 종료이후 다시 재실행시 UnityIAP 초기화가 실패하는 경우가 있습니다. 대략적으로 Inventory를 갱신시켜준후 Java프록시 호출이 실패하는 이슈(

lancekun.com

 

반응형
Posted by blueasa
, |
반응형

Unity 2021.3.32f1

----

 

[추가2]

AssetDelivery 1.7.0으로 iOS 빌드 하면서 ./GooglePlayPlugins/com.google.play.assetdelivery/Samples 폴더 관련 소스에서 에러가 나서 삭제 함.

 

[추가]

aab파일 150mb 초과해서 구글스토어 올리려고 알아보고

아래 [링크]의 내용대로 진행해서  Play Asset Delivery v1.8.2(2023-04-25 기준 최신)를 설치해서 빌드해보니,

빌드는 잘 되지만 실행하면 크래시 나면서 앱이 죽는다.

버전 정보를 보면 Play Asset Delivery v1.8.0 이상부터는 Unity 최소 버전이 2023.1.0 (베타)이다.

(1.8.0이상은 2023.1.0 이상이라고 돼있지만 2022.2.18f1에서 정상동작 하는걸 확인했다.)

 

[참조] https://github.com/google/play-unity-plugins/issues/187

 

Crash at Android 12 · Issue #187 · google/play-unity-plugins

Hello I'm now experiencing crash on android devices with Android 12 only. thread.cc:2372] Throwing new exception 'No interface method getPackStates(Ljava/util/List;)Lcom/google/android/play/core/ta...

github.com

 

크래시 내용을 찾아보니 위[참조]와 같은 내용이 있다.

Firebase와 PAD(Play Asset Delevery)와 호환성 문제가 있는 것 같다.

 

참조 링크의 내용대로면 현재 Play Asset Delivery v1.8.x 버전은 제대로 안되고, Play Asset Delivery v1.7.0을 사용해서 성공했다고 한다.

 

[Github:Play Unity Plugins v1.7.0] https://github.com/google/play-unity-plugins/releases/tag/v1.7.0

 

Release v1.7.0 · google/play-unity-plugins

com.google.play.integrity (v1.0.0) New Features Initial release Unchanged Packages com.google.android.appbundle (v1.7.0) com.google.play.appupdate (v1.7.0) com.google.play.assetdelivery (v1.7.0)...

github.com

[Google Play:Play Asset Delivery] https://developers.google.com/unity/archive?hl=ko#play_asset_delivery

 

Unity용 Google 패키지 다운로드  |  Google Developers

이 페이지는 Cloud Translation API를 통해 번역되었습니다. Switch to English Unity용 Google 패키지 다운로드 컬렉션을 사용해 정리하기 내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요. 이 보관 파

developers.google.com

 

위 Play Asset Delivery 링크에서 1.7.0버전 UnityPackage를 다운로드해서 Import하고,

정상 빌드 되는 것을 확인했다.

 

[결론]

Unity 2021 이하 Play Asset Delivery 1.7.0을 사용하고,

Unity 2022 이상은 Play Asset Delivery 1.8.2(2023-05-12 기준 최신)을 사용하자.

 

 

--------------------------------------------------------------------------------------------------------------------------------------------

 

[링크] https://devgod.tistory.com/49

 

[Unity] Unity Play Asset Delivery 앱 빌드, Unity 대용량 앱 빌드

2021년 8월부터 Google Play Store에선 obb를 이용한 대용량 앱 업로드가 사라지고, 무조건 Play Asset Delivery(PAD)를 통해 앱을 업로드 해야합니다. 제발 정책좀 그만 변경했으면 좋겠습니다. 먼저 제가 궁

devgod.tistory.com

 

반응형
Posted by blueasa
, |
반응형

Unity 2021.3.19f1

Firebase 9.6.0

Facebook Android Plugin 15.0.2

 

[Case 1]

 

Firebase로 Facebook 연동을 했는데,

Facebook Web에서는 로그인이 잘되는데

위 스크린샷처럼 Facebook App이 설치돼 있는상태에서 App으로 로그인 하려하면 Invalid key hash 에러가 발생했다.

 

Facebook Web Login이랑 Facebook App Login이랑 Hash Key가 다른것 같다.

 

에러 메시지에 뜨는 key hash를 페이스북 개발자 페이지에 추가해주니 정상적으로 Facebook App 로그인이 됐다.

 

----

[Case 2]

- 스토어에서 받은 앱은 Facebook App 로그인 진행하려니 Key hash는 안보이고 위와 같이 에러 메시지만 띄운다.

- 혹시나해서 LogCat으로  보니 Key hash가 보여서 등록하고 정상 로그인 확인 함.

 

 

[참조]

https://bozeury.tistory.com/entry/%ED%8E%98%EC%9D%B4%EC%8A%A4%EB%B6%81-%EC%97%B0%EB%8F%99%EC%8B%9C-invaild-key-hash%EB%9D%BC%EB%8A%94-%EC%97%90%EB%9F%AC%EA%B0%80-%EB%82%98%EC%98%AC%EB%95%8C

 

페이스북 연동시 invaild key hash라는 에러가 나올때

페이스북을 연동하고나서 적용했을때 이런 에러가 날때가 있다. facebook 개발자 페이지에 등록되어있는 해쉬키와 현재 내 앱의 해쉬키가 다르기 때문에 나는 에러이다. 어째서 이런 에러가 나는

bozeury.tistory.com

 

반응형
Posted by blueasa
, |
반응형

Unity 2022.2.5f1

----

 

[빌드에러]

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':launcher:packageRelease'.
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
   > com.android.ide.common.signing.KeytoolException: Failed to read key anne from store 
      "C:\Test_Unity2022\Keystore\testapp.keystore": Cannot recover key

 

Unity 2022 포팅 테스트 해볼 겸 올려보다가 빌드 에러가 나서 보니 위와 같은 에러가 뜨고 있다.

 

[해결]

확인해보니 keystore 비밀번호를 잘못 입력한 것 같다.

비밀번호는 별표(*)로 나와서 안보이니 입력할 때 꼼꼼하게 잘 확인하자.

 

[참조] https://kwonyoonjae.tistory.com/112

 

유니티 a failure occurred while executing com.android.build.gradle.internal.tasks.workers$actionfacade 해결 방법

유튜브를 보면서 처음으로 유니티를 이용해 게임을 만들던 중 문제가 생겼습니다. 바로 "a failure occurred while executing com.android.build.gradle.internal.tasks.workers$actionfacade"에러가 나온 것인데요. 처음에

kwonyoonjae.tistory.com

[참조2] https://appletreeworkplace.tistory.com/6

 

[유니티] android gradle build failed 뜰 때 해결법

UnityPlayerActivity.java uses or overrides a deprecated API. 갑자기요..? 정상적인 유니티에서 안드로이드 플랫폼 성공 과정이라 하믄~ build gradle project에서 그 다음 Copying APK를 봐야 안심이 된다. 그러나 build gr

appletreeworkplace.tistory.com

 

반응형
Posted by blueasa
, |
반응형

[링크] http://yoonhada.com/?p=1398 

 

[Build]유니티 안드로이드 Gradle Version 관리 – yoonhada

Gradle 도구를 사용할 때 꼭 알아야 할 버전관리 이슈을 정리해보았다. 특히 유니티 엔진같은 경우 특수한 경우이기 때문에 더욱더 중요하다. (내용은 안드로이드 스튜디오에서도 동일하게 적용

yoonhada.com

 

[링크2] https://chc3484.tistory.com/74

 

[Android Build] 유니티 안드로이드 Gradle Version 관리

Gradle 도구를 사용할 때 꼭 알아야 할 버전관리 이슈을 정리해보았다. 특히 유니티 엔진같은 경우 특수한 경우이기 때문에 더욱더 중요하다. (내용은 안드로이드 스튜디오에서도 동일하게 적용

chc3484.tistory.com

 

반응형
Posted by blueasa
, |
반응형

Unity 2021.3.16f1

External Dependency Manager 1.2.175

 

이번에 External Dependency Manager를 버전업 하게 돼서 생각없이 업데이트 했는데

아래와 같이 사용안하는 파일 삭제 할거냐고 묻는 창이 떴다.

 

잘 사용하고 있기도 하고, 위의 창에서 Cancel을 해도 컴파일 될 때 마다 계속 위의 창이 떠서 문제였는데,

짜증나게도 왜 삭제해야 되는지 왜 obsolete로 잡히는 지 설명이 없다.

 

신기한 건 해당 프로젝트에서는 이 창이 뜨는데, 다른 프로젝트에 같은 스크립트가 있는데도 창이 뜨지 않는다.

 

[해결]

이런저런 삽질하다가 혹시나해서 파일을 삭제하고 컴파일 되게 한 후에,

다시 같은 파일을 같은 위치에 넣으니 정상적으로 적용되고 위의 창이 뜨지 않는다.

 

예상되는 이유는

External Dependency Manager가 새로 설치되면서 위의 스크립트가 무언가의 이유?오류?로 유니티 프로젝트에서 사용안한다고 판단하고 프로젝트에서 사용안하니 삭제 할거냐고 계속 묻게 된 것 같다.

그리고, 삭제 후 다시 추가하면서 정상적으로 External Dependency Manager의 Google Version Handler에 제대로 인식되고 위의 창이 이제 안뜨는 것 같다.

 

[결론]

Version Handler가 인식못해서 계속 삭제하라고 하는 것 같으니

프로젝트에서 삭제했다가 다시 추가하자.

반응형
Posted by blueasa
, |