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

카테고리

분류 전체보기 (2737)
Unity3D (817)
Script (91)
Extensions (14)
Effect (3)
NGUI (77)
UGUI (8)
Physics (2)
Shader (36)
Math (1)
Design Pattern (2)
Xml (1)
Tips (200)
Link (22)
World (1)
AssetBundle (25)
Mecanim (2)
Plugins (70)
Trouble Shooting (68)
Encrypt (7)
LightMap (4)
Shadow (4)
Editor (8)
Crash Report (3)
Utility (9)
UnityVS (2)
Facebook SDK (2)
iTween (3)
Font (11)
Ad (14)
Photon (2)
IAP (1)
Google (8)
Android (45)
iOS (41)
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-20 00:00

techyworm10 commented 15 days ago

@chkuang-g I created fixed editor dll files (until it will be officially fixed):
https://github.com/techyworm10/firebase-unity-sdk-editor-python-fix

 

techyworm10 commented 3 days ago

@daltonbr Did you try to clear ./Library/PackageCache folder?

 

 

[출처] https://github.com/firebase/quickstart-unity/issues/1232

 

[Bug] Python2 is removed on macOS 12.3 !! Please update the Editor script · Issue #1232 · firebase/quickstart-unity

[REQUIRED] Please fill in the following fields: Unity editor version: 2020.3, 2021,2 Firebase Unity SDK version: 7.0 - 8.8 Source you installed the SDK: unitypackage (.unitypackage or Unity Package...

github.com

 

반응형
Posted by blueasa
, |

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

Unity 2020.3.27f1

Xcode 13.2.1

FBAEMKit 12.2.1

FBSDKCoreKit 12.2.1

FBSDKCoreKit_Basics 12.2.1

FBSDKLoginKit 12.2.1
GoogleMobileAds 6.1.2
GoogleMobileAds-FacebookUnityAdapter-3.6.0

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

회사 플랫폼에서 Firebase Auth를 쓰면서 FBSDK(12.2.1) framework 가 들어가게 됐는데,

여기서 광고를 쓰기 위해 GoogleMoblieAds(6.1.2)를 추가하고,

페이스북 광고를쓰기위해 GoogleMobileAds의 미디에이션인 FacebookUnityAdapter(3.6.0)을 추가했는데..

Android는 잘되는데 iOS에서 에러 남.

 

플러그인 추가 진행 상황은 아래와 같다.

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

1) 플랫폼 SDK 추가하면서 FBSDK(12.2.1) 추가

  1.1)Plugins/iOS에 프레임워크 추가 돼 있음(FBAEMKit.framework/FBSDKCoreKit.framework/FBSDKCoreKit_Basics.framework/FBSDKLoginKit.framework)

 

2) GoogleMobileAds(6.1.2) 추가 -> 빌드 잘 됨

 

3) GoogleMobileAds-FacebookUnityAdapter(3.6.0) 추가 -> 빌드 에러

  3.1) [에러메시지] Undefined Symbols for architecture arm64: "_OBJC_CLASS_$_GAD...

  3.2) [해결방법] Unity Editor-Menu-External Dependency Manager-iOS Resolver-Settings : Link frameworks statically <- 체크

  3.3) [참조] https://blueasa.tistory.com/2587

 

4) 3) 해결 후, 빌드는 되는데 런타임에서 에러 남 -> 런타임 에러

  4.1) [에러메시지] Library not loaded: @rpath/FBAEMKit.framework...

    4.1.1) [추천] 4.2.4 방식 먼저 시도

  4.2.) [해결방법] 구글링 하다보니 아래와 같은 내용이 있음.

     4.2.1) General->Frameworks, Library, and Embedded Content. If it's "Do Not Embed", change to "Embed Without Signing"

      (참조: https://stackoverflow.com/questions/58144104/xcode11-dyld-library-not-loaded-reason-image-not-found)

    4.2.2) 빌드하고 수정하긴 그래서 XcodePostProcessor.cs에 아래 내용을 추가함.

        (처음엔 weak 파라미터를 false로 추가해봤었는데 여전히 런타임 에러 남)

      [추가소스]

      /// Initialize PbxProject
      var projectPath = pathToBuiltProject + "/Unity-iPhone.xcodeproj/project.pbxproj";
      PBXProject pbxProject = new PBXProject();
      pbxProject.ReadFromFile(projectPath);
      string targetGuid = pbxProject.GetUnityFrameworkTargetGuid();

 

      // 플랫폼 SDK에서 아래 4개 프레임워크를 추가해놔서 여기서도 4개 추가시킴

      pbxProject.AddFrameworkToProject(targetGuid, "FBAEMKit.framework", true); // weak 부분을 true로 넘김

      pbxProject.AddFrameworkToProject(targetGuid, "FBSDKCoreKit.framework", true);

      pbxProject.AddFrameworkToProject(targetGuid, "FBSDKCoreKit_Basics.framework", true);

      pbxProject.AddFrameworkToProject(targetGuid, "FBSDKLoginKit.framework", true);

 

    4.2.3) 위의 4.2.2) 방법이 안된다면 (스크립트로 프레임워크 추가를 안하고) 직접 넣어도 됨

              직접 넣는 건 아래 링크에서 원하는 버전의 FacebookSDK-Static_XCFramework를 다운받아서 추가.

              (iOS는 받아서 압축풀어보면 여러개의 폴더가 나오는데 ios-arm64(또는 ios-arm64_armv7) 폴더를 사용하면 된다)

              [링크] https://github.com/facebook/facebook-ios-sdk/releases

 

    4.2.3.1) static 프레임워크 추가하고  Undefined symbol: _vDSP 에러가 나면 Accelerate.framework도 추가하자.

                [참조] https://minmong.tistory.com/242

 

  4.2.4) 최근(2023-05-10)에 FacebookSDK 버전을 올리려고 확인 해보면서 FacebookSDK_Dynamic.xcframework를 적용해봤는데 이걸로 해도 잘되는 것 같다.

    4.2.4.1) FacebookSDK_Dynamic.xcframework 추가

    4.2.4.2) 기존 Dependencies.xml은 버전 맞춰 주기(난 15.0.0으로 맞춤)

      [참조] <iosPod name="FBSDKLoginKit" version="15.0.0" minTargetSdk="12.0"> </iosPod>

 

 

5) 4)까지 하고 빌드하니 런타임에서도 에러 안나고 잘 됨. -> 빌드 잘 됨

 

6) 빌드 성공!

 

 

[첨언]

결론적으로 GoogleMobileAds가 Static Framework을 강제(Link frameworks statically)하면서 생기는 문제로 보인다.

결국 GoogleMobileAds를 사용해야 된다면 dynamic framework 추가 방식은 불가능하므로, Facebook 관련 SDK 소스를 직접 추가(4.2.3)하는게 맞는 것 같다.

 

반응형
Posted by blueasa
, |

[상황]

Firebase 8.8.0-RemoteConfig 추가하고 연동하면서 에러 발생

 

[에러 메시지]

오류 CS0433 'Task' 형식이 'Unity.Tasks, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' 및 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'에 모두 있습니다.

 

[해결방법]

/Parse/Plugins 아래에서 안쓰는 버전의 Unity.Compat, Unity.Tasks 제거

(.NET 4.x 버전을 쓰고 있어서 .NET 3.5 버전 Unity.Compat, Unity.Tasks 제거함)

 

 

[참조] https://drehzr.tistory.com/1080

 

문제해결)error CS0012: The type `System.Threading.Tasks.Task' is defined in an assembly that is not referenced. Consider add

error CS0012: The type `System.Threading.Tasks.Task' is defined in an assembly that is not referenced. Consider adding a reference to assembly 그전의 Firebase 패키지를 처리하는 도..

drehzr.tistory.com

 

반응형
Posted by blueasa
, |

[문제]

Unity 2020.3에서 'UnityEngine.AI.NavMeshAgent'를 사용하는 소스가 있는 에셋을 추가하니 아래와 같은 에러메시지가 뜸.

 

[에러메시지] CS1069: The type name 'NavMeshAgent' could not be found in the namespace 'UnityEngine.AI'.

 

[해결방법] Package Manager-Built-in-AI Enable

[참조] You have to enable the built in package 'AI' in the Package Manager window to fix this error.

 

 

[출처] https://forum.unity.com/threads/cant-find-navmeshagent-data-type.449932/

 

Can't find NavMeshAgent data type

I will make an AI but I can't find the data type. I don't understand what's going on. if you know, how can i fix this? [IMG] As you see, the data...

forum.unity.com

 

반응형
Posted by blueasa
, |

[ErrorMessage] Unexpected character encountered while parsing value: . Path '', line 0, position 0.

 

[Solved] In my case, the file containing JSON string had BOM. Once I removed BOM the problem was solved.

 

[추가] 로드 할 파일 인코딩 타입을 확인해보자.

 

[출처] https://stackoverflow.com/questions/23259173/unexpected-character-encountered-while-parsing-value

 

Unexpected character encountered while parsing value

Currently, I have some issues. I'm using C# with Json.NET. The issue is that I always get: {"Unexpected character encountered while parsing value: e. Path '', line 0, position 0."} So t...

stackoverflow.com

 

반응형
Posted by blueasa
, |

1. 큰 텍스쳐 로드 시 문제

  -> 텍스쳐 사이즈 줄이기

----

We found out that this problem was caused by big textures loaded at the same time.

After removing these big textures the game started up without any problems.

So for everyone that has the same problem.

Check your big textures and check when they are being loaded and try to load.

----

 

2. 동시에 2번의 File IO

  -> 동시에 File IO 안되도록 수정

----

We found out that this problem was caused by using PlayerPrefs.Save() twice at the same time on two different functions, also we had used File.write() at that time. when we save and write files at a different time, this issue solved.

----

 

[출처] https://stackoverflow.com/questions/37279027/java-lang-error-signal-11-sigsegv-code-1-segv-maperr-unity-spine-android

 

java.lang.Error: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) Unity Spine Android

Hi I currently have a problem on a app I made where the app crashes on startup or after the intro video. I am working with Unity3D and Spine to create a 2D game for Android and IOS. I have searched

stackoverflow.com

 

반응형
Posted by blueasa
, |

First thing to do was to switch to Unity beta 2018.1. There you have the UnityWebRequest.certificateHandler This allows to set up custom certificate validation. one last thing to do is to create an object extending CertificateHandler to manage Certificate validation. (See here in Unity beta documentation)


Here is the code :

MyMonoBehaviour :

 IEnumerator GetRequest(string uri){
     UnityWebRequest request = UnityWebRequest.Get(uri);
     request.certificateHandler = new AcceptAllCertificatesSignedWithASpecificKeyPublicKey();
     yield return request.SendWebRequest ();
     if (request.isNetworkError)
     {
         Debug.Log("Something went wrong, and returned error: " + request.error);
     }
     else
     {
         // Show results as text
         Debug.Log(request.downloadHandler.text);
     }
 }

 

AcceptAllCertificatesSignedWithASpecificKeyPublicKey :

 using UnityEngine.Networking;
 using System.Security.Cryptography.X509Certificates;
 using UnityEngine;
 // Based on https://www.owasp.org/index.php/Certificate_and_Public_Key_Pinning#.Net
 class AcceptAllCertificatesSignedWithASpecificKeyPublicKey : CertificateHandler
 {
 
  // Encoded RSAPublicKey
  private static string PUB_KEY = "mypublickey";
  protected override bool ValidateCertificate(byte[] certificateData)
  {
     X509Certificate2 certificate = new X509Certificate2(certificateData);
     string pk = certificate.GetPublicKeyString();
     if (pk.ToLower().Equals(PUB_KEY.ToLower()))
         return true;
     return false;
  }
 }

 

 

[출처]

answers.unity.com/questions/1479862/unitywebrequest-tomcat-redirect-and-self-signed-ss.html?_ga=2.234326166.94048792.1618987174-1334006087.1612316380

 

UnityWebRequest tomcat redirect and self signed SSL certificate - Unity Answers

 

answers.unity.com

 

반응형
Posted by blueasa
, |

[에러 메시지]

An asset is marked with HideFlags.DontSave but is included in the build:
Asset: 'Library/unity editor resources'
Asset name: Font Material
(You are probably referencing internal Unity data in your build.)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

 

[해결방법]

유니티 자체 폰트 중 Arial을 제외한 다른 자체 폰트를 쓰면 안된다고 한다.

내부 폰트 사용하는 부분을 찾아서 다른걸로 교체하자.

 

 

[출처] lhh3520.tistory.com/168

 

[Unity3D] Asset: 'Library/unity editor resources' 에러

유니티를 빌드 하다보면 아래같은 에러가 날 때가 있는데.. 갑자기 뜬금없이 나니까 당황스럽네요. 여기저기 찾아보니 해결방법은 Unity Font 중에 Arial 을 제외한 다른 폰트 를 쓰면 안됩니다. UI

lhh3520.tistory.com

 

반응형
Posted by blueasa
, |

[Error Message]

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

stderr[

        Attribute application@fullBackupContent value=(@xml/vungle_backup_rule) from [com.vungle:publisher-sdk-android:6.8.1] AndroidManifest.xml:20:9-60

        is also present at [com.appsflyer:af-android-sdk:6.1.0] AndroidManifest.xml:16:18-73 value=(@xml/appsflyer_backup_rules).

        Suggestion: add 'tools:replace="android:fullBackupContent"' to element at AndroidManifest.xml:4:3-99:17 to override.

 

FAILURE: Build failed with an exception.

 

* What went wrong:

Execution failed for task ':processReleaseManifest'.

> Manifest merger failed : Attribute application@fullBackupContent value=(@xml/vungle_backup_rule) from [com.vungle:publisher-sdk-android:6.8.1] AndroidManifest.xml:20:9-60

        is also present at [com.appsflyer:af-android-sdk:6.1.0] AndroidManifest.xml:16:18-73 value=(@xml/appsflyer_backup_rules).

        Suggestion: add 'tools:replace="android:fullBackupContent"' to element at AndroidManifest.xml:4:3-99:17 to override.

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

 

AppsFlyer를 사용하고 있었고, Admob 미디에이션 플러그인으로 이번에 Vungle을 추가하면서 위와 같은 안드로이드 빌드 에러가 나서 확인해보니 이전부터 있던 충돌 문제 같다.

 

해결방법은 아래와 같다.

 

[해결방법]

Androidmanifest.xml 파일의 application에 아래와 같이 3가지 내용을 추가한다.

자동백업 여부에 따라서 1,2번 중 하나로 설정하면 된다.

(자동백업 하다가 꼬일 것 같아서 나는 1) 자동백업 false로 설정함)

 

1) 자동백업을 안하려면 false

<application
    tools:replace="android:fullBackupContent" android:allowBackup="false" android: fullBackupContent="false"

>

 

2) 자동백업 하려면 true

<application
    tools:replace="android:fullBackupContent" android:allowBackup="true" android: fullBackupContent="true"

>

 

 

[참조] github.com/AppsFlyerSDK/appsflyer-android-sdk/issues/9

 

Help · Issue #9 · AppsFlyerSDK/appsflyer-android-sdk

tools:replace specified at line:20 for attribute android:fullBackupContent, but no new value specified

github.com

[참조2] m.blog.naver.com/netrance/221224761858

 

[안드로이드] 앱 삭제 했는데 데이터가 남아 있는 문제

앱을 삭제 후 재설치하면, 삭제 전에 저장되었던 자료들이 남아있는 문제가 발견되었습니다. 원인은 자동 ...

blog.naver.com

 

반응형
Posted by blueasa
, |

exception : Not a valid calendar for the given culture. Parameter name: value

 

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

 

iOS에서 시스템 언어가 태국어(Thai) 일 때, 위와 같은 에러가 나서 확인해보니,

il2cpp에서 태국어 일 때 CultureInfo를 제대로 생성 못하는 버그가 있다고 한다.

 

그래서 [참조] 링크의 내용을 참조해서 아래와 같이 소스를 넣고, 앱 시작 시 실행하도록 소스를 추가 했다.

(아랍어도 같은 이슈가 있다고 해서 소스를 같이 추가함)

 

    public static void InitArabicCalendarCrashFix()
    {
        // Two Letter ISO Language
        string strTwoLetterISOLanguage = System.Threading.Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName;
        Debug.LogFormat("[CurrentCulture.strTwoLetterISOLanguage] {0}", strTwoLetterISOLanguage);
        if (strTwoLetterISOLanguage == "ar")
        {
            new System.Globalization.UmAlQuraCalendar();
        }

        // CultureName
        //string strCurrentCultureName = System.Threading.Thread.CurrentThread.CurrentCulture.Name;
        //Debug.LogFormat("[CurrentCulture.Name] {0}", strCurrentCultureName);
        //if (strCurrentCultureName == "ar-SA")
        //{
        //    new System.Globalization.UmAlQuraCalendar();
        //}
    }

    public static void InitThaiCalendarCrashFix()
    {
        // Two Letter ISO Language
        string strTwoLetterISOLanguage = System.Threading.Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName;
        Debug.LogFormat("[CurrentCulture.strTwoLetterISOLanguage] {0}", strTwoLetterISOLanguage);
        if (strTwoLetterISOLanguage == "th")
        {
            new System.Globalization.ThaiBuddhistCalendar();
        }

        // CultureName
        //string strCurrentCultureName = System.Threading.Thread.CurrentThread.CurrentCulture.Name;
        //Debug.LogFormat("[CurrentCulture.Name] {0}", strCurrentCultureName);
        //if (strCurrentCultureName == "th-TH")
        //{
        //    new System.Globalization.ThaiBuddhistCalendar();
        //}
    }

 

 

 

[참조]

forums.xamarin.com/discussion/42899/datetime-tostring-throws-argumentoutofrangeexception-in-thai-locale

 

DateTime.ToString() throws ArgumentOutOfRangeException in Thai locale

Hi, We're seeing an issue when our app is being used on iOS when in the Thai locale, seemingly down to the DateTime.ToString() method throwing an ArgumentOutOfRangeException with the message "Not a valid calendar for the given culture".

forums.xamarin.com

 

반응형
Posted by blueasa
, |