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

카테고리

분류 전체보기 (2737)
Unity3D (817)
Programming (474)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (228)
협업 (58)
3DS Max (3)
Game (12)
Utility (136)
Etc (96)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (53)
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
04-27 14:56

[LInk] https://plugins.jenkins.io/build-failure-analyzer/

 

Build Failure Analyzer

Jenkins Build Failure Analyzer. This plugin scans build logs and other files in the workspace for recognised patterns of known causes to build failures, and displays them on the build page for quicker recognition of why the build failed.

plugins.jenkins.io

 

[Failure Cause Setting]

 

[Pattern]

.*.: error CS.*

 

 

 

반응형
Posted by blueasa
, |
I used the post in the 'EDIT 2' to come up with a decent solution. I don't know if it will work 100% of the time and I would love for someone to correct me if I have chosen a poor solution. This should allow me to run code before the build starts, and if the build fails or succeeds without changing the unity build pipeline.
class CustomBuildPipeline : MonoBehaviour, IPreprocessBuildWithReport, IPostprocessBuildWithReport
{
    public int callbackOrder => 0;

    // CALLED BEFORE THE BUILD
    public void OnPreprocessBuild(BuildReport report)
    {
        // Start listening for errors when build starts
        Application.logMessageReceived += OnBuildError;
    }

    // CALLED DURING BUILD TO CHECK FOR ERRORS
    private void OnBuildError(string condition, string stacktrace, LogType type)
    {
        if (type == LogType.Error)
        {
            // FAILED TO BUILD, STOP LISTENING FOR ERRORS
            Application.logMessageReceived -= OnBuildError;
        }
    }

    // CALLED AFTER THE BUILD
    public void OnPostprocessBuild(BuildReport report)
    {
        // IF BUILD FINISHED AND SUCCEEDED, STOP LOOKING FOR ERRORS
        Application.logMessageReceived -= OnBuildError;
    }
}

 

[출처] https://stackoverflow.com/questions/58840114/unity-editor-detect-when-build-fails

반응형
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
, |

Unity 2021.3.32f1

----

 

[추가3] 2024-03-27

Play Asset Delivery v1.9.0(2024-03-27 기준 최신)이 업데이트 됐다.

1.9.0은 최소 Unity 버전이 2017.4로 표기돼있다.(버전별 문제를 해결한건가..?)

 

[추가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 기준 최신)을 사용하자.

(Unity 2021에서도 gradle 4.2.0을 적용하면 Play Asset Delivery 1.8.2 이상을 사용할 수 있다.

  2024-03-27 기준 1.9.0이 나와있으니 1.9.0을 사용하자.)

 

 

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

 

[링크] 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.16f1

Xcode 14.2

Firebase 10.4.0

----

 

[빌드 에러]

pod install output:



Analyzing dependencies

[!] CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":

  In Podfile:

    Firebase/Auth (= 10.6.0) was resolved to 10.6.0, which depends on

      FirebaseAuth (~> 10.6.0) was resolved to 10.6.0, which depends on

        GTMSessionFetcher/Core (< 4.0, >= 2.1)



    GoogleSignIn (= 6.0.2) was resolved to 6.0.2, which depends on

      GTMAppAuth (~> 1.0) was resolved to 1.3.1, which depends on

        GTMSessionFetcher/Core (< 3.0, >= 1.5)



    GoogleSignIn (= 6.0.2) was resolved to 6.0.2, which depends on

      GTMSessionFetcher/Core (~> 1.1)

 

Firebase 10.6.0이 업데이트 돼서 다시 한 번 iOS 빌드를 시도해 봤는데 여전히 에러가 난다.

(참조 : https://blueasa.tistory.com/2706)

 

[XCode] [!] Cocoapods could not find compatible versions for pod "GTMSessionFetcher/Core"

Unity 2021.3.16f1 Xcode 14.2 Firebase 10.4.0 ---- [빌드에러] pod install output: Analyzing dependencies [!] CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core": In Podfile: Firebase/Auth (= 10.4.0) was resolved to 10.4.0, whic

blueasa.tistory.com

 

그래도 다시 이리저리 검색해보다보니 해결했다는 글이 아래와 같이 있다.

UnayOzan commented on Feb 5
Fixed this error with changing the version in "GoogleSignIn.podspec.json" file.

Firebase/Auth (= 10.4.0) was resolved to 10.4.0, which depends on
FirebaseAuth (~> 10.4.0) was resolved to 10.4.0, which depends on
GTMSessionFetcher/Core (< 4.0, >= 2.1)

GoogleSignIn (~> **5.0.2**) was resolved to **5.0.2**, which depends on
  GTMSessionFetcher/Core (~> **1.1**)
I found the file in {user}.cocoapods/repos/cocoapods/Specs and then just search for "GoogleSignIn.podspec.json".
Find the folder with the same version with the error, in my case 5.0.2.
And then change its dependencies with the version 7.0.0 or something that works with the other packages.
In my project the solution was this;

 "dependencies": {
    "AppAuth": [
      "~> 1.5"
    ],
    "GTMAppAuth": [
      ">= 1.3",
      "< 3.0"
    ],
    "GTMSessionFetcher/Core": [
      ">= 1.1",
      "< 4.0"
    ]
After that I exited Xcode, deintagrated pods, cleaned cache and installed it again.
Everything works fine now.

[링크] https://github.com/firebase/firebase-unity-sdk/issues/621

 

[Bug] FirebaseAuth and GoogleSignIn iOS Build failure · Issue #621 · firebase/firebase-unity-sdk

[REQUIRED] Please fill in the following fields: Unity editor version: 2021.3.17f1 Firebase Unity SDK version: 10.4.0 Source you installed the SDK: .unitypackage Problematic Firebase Component: Auth...

github.com

 

글을 보면 아래와 같은 내용이 있다.

And then change its dependencies with the version 7.0.0 or something that works with the other packages.
In my project the solution was this;

에러도 나와 거의 같아서 확인해보니 GoogleSignIn 버전이 현재 6.0.2여서 GTMSessionFetcher/Core (~> 1.1)를 지원하는데,

설치한 FirebaseAuth 10.6.0은 GTMSessionFetcher/Core (< 4.0, >= 2.1)을 사용하고 있어서

GTMSessionFetcher/Core 버전이 서로 호환이 안되는 것 같다.

 

위 링크의 내용대로

GoogleSignIn 버전을 7.0.0(2023-03-27 기준 최신) 버전으로 변경하고 빌드를 다시해보니 깔끔하게 빌드가 잘 된다.

 

[추가]

빌드는 잘 되는데 회사 플랫폼에서 사용하는 GoogleSignIn이 6.0.2여서 7.0.0으로 올리면서 API 호환이 안돼서 로그인 시도할 때 Crash가 나면서 앱이 강제종료 된다.

6.2.4
  2.x 버전을 허용하도록 GTMSessionFetcher 종속 항목을 업데이트했습니다. (#207)

GoogleSignIn에서 해당 빌드 오류 이슈를 해결한 버전은 6.2.4여서 6.2.4로 버전을 내렸다.

나처럼 다른 이슈로 7.0.0으로 못올리는 사람은 6.2.4로 한 번 시도해 보면 좋을 것 같다.

 

[GoogleSignIn 버전 참조] https://developers.google.com/identity/sign-in/ios/release?hl=ko

 

Google 로그인 iOS 및 macOS SDK 출시 노트  |  Authentication  |  Google Developers

이 페이지는 Cloud Translation API를 통해 번역되었습니다. Switch to English 의견 보내기 Google 로그인 iOS 및 macOS SDK 출시 노트 컬렉션을 사용해 정리하기 내 환경설정을 기준으로 콘텐츠를 저장하고 분

developers.google.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
, |

[빌드 시, Builtin AssetBundles에서 해당 Platform 에셋번들만 빌드 되도록 하기 위한 PreProcessor 추가]

기본적으로 에셋번들은 플랫폼 별로 모두 가지고 있는데 해당 플랫폼에 맞는 에셋번들만 빌드 되도록 하기 위해서

빌드 전(PreProcessor)에 잠시 다른 곳(Temp)으로 옮겼다가, 빌드 후(PostProcessor)에 되돌려 놓도록 함.

 

using System;
using UnityEditor;
using UnityEditor.Build;
#if UNITY_2018_1_OR_NEWER
using UnityEditor.Build.Reporting;
#endif
using UnityEditor.Callbacks;

namespace blueasa
{
    /// <summary>
    /// 빌드 시, Built-in AssetBundle에서 해당 Platform AssetBundle만 빌드 되도록 하기 위한 Preprocessor
    /// 빌드 전(Preprocessor) 해당 안되는 AssetBundle을 옮겨뒀다가, 빌드 후(Postprocessor) 되돌려 놓음
    /// </summary>
#if UNITY_2018_1_OR_NEWER
    public class BuildPreprocessor_BuiltinAssetBundle : IPreprocessBuildWithReport, IPostprocessBuildWithReport
#else
    public class BuildPreprocessor_BuiltinAssetBundle : IPreprocessBuild, IPostprocessBuild
#endif
    {
        private static readonly string m_strTemp = "Temp";
        private static readonly string m_strAssetBundlesPath_Builtin_Android = "Assets/StreamingAssets/AssetBundles/Android";
        private static readonly string m_strAssetBundlesPath_Builtin_iOS = "Assets/StreamingAssets/AssetBundles/iOS";
        private static readonly string m_strAssetBundlesPath_Temp_Android = "Assets/Temp/Android";
        private static readonly string m_strAssetBundlesPath_Temp_iOS = "Assets/Temp/iOS";

        public int callbackOrder { get { return 0; } }

#if UNITY_2018_1_OR_NEWER
        public void OnPreprocessBuild(BuildReport report)
#else
        public void OnPreprocessBuild(BuildTarget target, string path)
#endif
        {
            Debug.LogWarning($"[OnPreprocessBuild] {this}");

            // Temp 폴더 없으면 생성
            if (false == AssetDatabase.IsValidFolder("Assets/Temp"))
            {
                Debug.LogWarning("[OnPreprocessBuild] Create 'Temp' Folder");
                AssetDatabase.CreateFolder("Assets", m_strTemp);
                AssetDatabase.Refresh();
            }

            // 빌드 전, 다른 플랫폼 AssetBundle 폴더 임시 Move(제외)
#if UNITY_ANDROID
            if (true == AssetDatabase.IsValidFolder(m_strAssetBundlesPath_Builtin_iOS)
                && false == AssetDatabase.IsValidFolder(m_strAssetBundlesPath_Temp_iOS))
            {
                Debug.LogWarning("[OnPreprocessBuild] Move 'iOS' Folder to 'Temp'");
                AssetDatabase.MoveAsset(m_strAssetBundlesPath_Builtin_iOS, m_strAssetBundlesPath_Temp_iOS);
                AssetDatabase.Refresh();
            }
#elif UNITY_IOS
            if (true == AssetDatabase.IsValidFolder(m_strAssetBundlesPath_Builtin_Android)
                && false == AssetDatabase.IsValidFolder(m_strAssetBundlesPath_Temp_Android))
            {
                Debug.LogWarning("[OnPreprocessBuild] Move 'Android' Folder to 'Temp'");
                AssetDatabase.MoveAsset(m_strAssetBundlesPath_Builtin_Android, m_strAssetBundlesPath_Temp_Android);
                AssetDatabase.Refresh();
            }
#endif
        }

#if UNITY_2018_1_OR_NEWER
        public void OnPostprocessBuild(BuildReport report)
#else
    public void OnPostprocessBuild(BuildTarget target, string path)
#endif
        {
            Debug.LogWarning($"[OnPostprocessBuild] {this}");

            // 빌드 후, Move(제외) 됐던 다른 플랫폼 AssetBundle 폴더 원래 자리로 되돌리기
#if UNITY_ANDROID
            if (true == AssetDatabase.IsValidFolder(m_strAssetBundlesPath_Temp_iOS)
                && false == AssetDatabase.IsValidFolder(m_strAssetBundlesPath_Builtin_iOS))
            {
                Debug.LogWarning("[OnPreprocessBuild] Return 'iOS' Folder From 'Temp'");
                AssetDatabase.MoveAsset(m_strAssetBundlesPath_Temp_iOS, m_strAssetBundlesPath_Builtin_iOS);
                AssetDatabase.Refresh();
            }
#elif UNITY_IOS
            if (true == AssetDatabase.IsValidFolder(m_strAssetBundlesPath_Temp_Android)
                && false == AssetDatabase.IsValidFolder(m_strAssetBundlesPath_Builtin_Android))
            {
                Debug.LogWarning("[OnPreprocessBuild] Return 'Android' Folder From 'Temp'");
                AssetDatabase.MoveAsset(m_strAssetBundlesPath_Temp_Android, m_strAssetBundlesPath_Builtin_Android);
                AssetDatabase.Refresh();
            }
#endif
        }
    }
}

 

 

반응형
Posted by blueasa
, |

Unity 2021.3.11f1

I2 Localization(app_name 로컬라이징 용도)

 

I2 Localization 에셋으로 app_name Localization을 하고 있었는데,

Unity 2021.3.11f1으로 업데이트 한 후에 Android에서 로컬라이징이 되지 않고 기본 설정된 App Name만 나오는 문제가 생겼다.

(대충 검색해보니 Unity 2021.3부터 나오는 이슈 같다)

 

그래서 생성된 res 폴더를 ../Assets/Plugins/Android/ 하위에 직접 넣고 빌드해보니 아래와 같은 에러가 나온다.

 

Exception: OBSOLETE - Providing Android resources in Assets/Plugins/Android/res was removed, please move your resources to an AAR or an Android Library. See "AAR plug-ins and Android Libraries" section of the Manual for more details.
UnityEditor.Android.PostProcessor.Tasks.CheckUserResources.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <5e58a3838afa4e88a08dc92f05003dcc>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <5e58a3838afa4e88a08dc92f05003dcc>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PrepareForBuild (UnityEditor.BuildOptions options, UnityEditor.BuildTarget target) (at <5e58a3838afa4e88a08dc92f05003dcc>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PrepareForBuild (UnityEditor.BuildOptions options, UnityEditor.BuildTarget target) (at <5e58a3838afa4e88a08dc92f05003dcc>:0)
UnityEditor.PostprocessBuildPlayer.PrepareForBuild (UnityEditor.BuildOptions options, UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target) (at <4e64905d831f4883a53259ef37fb023b>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

app_name 로컬라이징에 사용되던 /res/ 폴더 하위에 넣는 방식을 Unity 2021.3 이후에는 더이상 지원하지 않나보다.

 

그래서 검색해보니 아래 링크에 해결방법이 적혀있다.

 

[링크] https://develop.hateblo.jp/entry/android-res-error

 

【Unity】Androidのresフォルダがビルドエラーになる場合の対処法 - AppSeedのアプリ開発ブログ

最近、Unityを2021.3.9f1にアップデートしたのですが、Assets/Plugin/Android/res に配置していたフォルダの部分で下記のようなエラーが出るようになってしまいました。今回はこの対処法についてメ

develop.hateblo.jp

해결방법은 링크의 res.androidlib 폴더를 만드는 방법을 참조하면 된다.

링크의 xml 파일등이 띄어쓰기등이 좀 문제 있어서 겸사겸사 간단히 요약해서 적어 둠.

 

  [해결방법]

1. ../Assets/Plugins/Android/ 하위에 res.androidlib 폴더 생성

 

2. res.androidlib 폴더에 아래 파일을 다운받아서 추가하거나 AndroidManifest.xml 파일 직접 생성해서 입력

AndroidManifest.xml
0.00MB

[참조] AndroidManifest.xml 파일 내용

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="custom.android.res" android:versionCode="1" android:versionName="1.0">
</manifest>

 

2. res.androidlib 폴더에 아래 파일을 다운받아서 추가하거나 project.properties 파일 직접 생성해서 입력

project.properties
0.00MB

 

[참조] project.properties 파일 내용

target=android-9
android.library=true

 

3. 기존에 있던 res 폴더(하위에 values/values-en/values-ko 등 포함)를 res.androidlib 폴더로 이동

 

4. 위의 순서 진행하면 아래와 같이 된다.

res.androidlib 폴더
res 폴더(default 포함, 내가쓰는 언어들)

 

5. 이제 빌드 하면.. 된다!!

 

 

[참조] [Unity] 안드로이드 국가별 앱 이름 변경

 

[Unity] 안드로이드 국가별 앱 이름 변경

안녕하세요. 안드로이드 폰에 앱을 설치를 하면, Product Name으로 설정해놓은 이름으로 앱이 설치가 됩니다. 오늘은 앱 이름을 국가별로 다르게 설정하는 법에 대해 다루겠습니다. 일단 Assets\Plugins

scvtwo.tistory.com

[참조] Unity Android 빌드 후 국가별(언어별) 앱 이름 대응

 

Unity Android 빌드 후 국가별(언어별) 앱 이름 대응

Project Settings에서 Product Name을 이용하여 앱 이름을 설정할 수 있지만 이 경우 추후 google 및 apple에 등록한 뒤 변경이 어려운 경우가 분명 생기기 마련이고 (분명 다른 이유로라도 뭐 서버라든지 하

young-94.tistory.com

 

반응형
Posted by blueasa
, |

[링크] https://if1live.github.io/posts/make-unity-build-system/

 

유니티 프로젝트 빌드 시스템 구축하기 · /usr/lib/libsora.so

개요 내가 만든 Toy Clash는 Samsung GearVR, Google Daydream, SteamVR, iOS를 지원한다. 이걸로 끝이 아니라 조만간 Windows Store도 추가될 예정이다. 내가 개발해보니까 이정도 갯수의 플랫폼을 지원하기 위해서

if1live.github.io

 

반응형
Posted by blueasa
, |

[추가] 2021-08-05 확인

GoogleMobileAds v6.0.1(2021-06-27 업데이트)에서 수정됐다.

https://github.com/googleads/googleads-mobile-unity/releases/tag/v6.0.1

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

 

GoogleMobileAds v6.0.0이 나와서 설치했는데 iOS에서 Build Error가 나서 확인해보니 GoogleMobileAds v6.0.0 버그 같다.

 

아래와 같이 Workaround.m 파일을 만들어서 추가하면 해결 된다.

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

qbit86 commented 2 days ago

@onom88
It would probably be sufficient to reduce Assets/Plugins/iOS/Workaround.m to just this, with no headers needed at all:
// Workaround for https://github.com/googleads/googleads-mobile-unity/issues/1616

typedef const void *GADUTypeInterstitialRef;

typedef const void *GADUTypeRewardedAdRef;

typedef const void *GADUTypeRequestRef;

void GADURequestInterstitial(GADUTypeInterstitialRef interstitial, GADUTypeRequestRef request) { }

void GADURequestRewardedAd(GADUTypeRewardedAdRef rewardedAd, GADUTypeRequestRef request) { }

 

 

[링크] https://github.com/googleads/googleads-mobile-unity/issues/1616

 

Build iOS failed: Undefined symbols for architecture arm64: "_GADURequestInterstitial" · Issue #1616 · googleads/googleads-mob

Unity version: 2020.3.1 - 2020.3.6 Google Mobile Ads Unity plugin version: 6.0.0 Platform: iOS Platform OS version: n/a Any specific devices issue occurs on: n/a Mediation ad networks used, and the...

github.com

 

반응형
Posted by blueasa
, |