Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] External Dependency Manager doesn't show up in Unity under Assets #711

Open
Shadowing1983 opened this issue Sep 20, 2024 · 14 comments
Assignees
Labels
needs-attention Need Googler's attention type: question

Comments

@Shadowing1983
Copy link

Shadowing1983 commented Sep 20, 2024

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2022.3.45
  • External Dependency Manager version: 1.2.183
  • Source you installed EDM4U: Unitypackage (.unitypackage or Unity Package Manager)
  • Features in External Dependency Manager in use: Android Resolver (Android Resolver, iOS Resolver, VersionHandler, etc.)
  • Plugins SDK in use: Admob (Firebase, Admob, Facebook, etc.)
  • Platform you are using the Unity editor on: Windows (Mac, Windows, or Linux)

[REQUIRED] Please describe the issue here:

After Importing the package. External Dependency Manger is not listed under Assets.
This is because Editor is not checked under Google.IOS Resolver
Ifi check it. It will show up in the editor but when I go to click Install Cocoapods I get error

TypeLoadException: Could not load type of field 'Google.IOSResolver:analytics' (57) due to: Could not resolve type with token 01000016 from typeref (expected class 'Google.EditorMeasurement' in assembly 'Google.VersionHandlerImpl, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null') assembly:Google.VersionHandlerImpl, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null type:Google.EditorMeasurement member:(null)

Please answer the following, if applicable:

What's the issue repro rate? (eg 100%, 1/5 etc)
100 percent

What happened? How can we make the problem occur?
This could be a description, log/console output, etc.
Import package

@google-oss-bot
Copy link

This issue does not seem to follow the issue template. Make sure you provide all the required information.

@argzdev argzdev removed the new to be triaged label Sep 20, 2024
@argzdev argzdev self-assigned this Sep 23, 2024
@argzdev
Copy link
Collaborator

argzdev commented Sep 24, 2024

Hi @Shadowing1983, thanks for reaching out. I was able to reproduce the same behavior when only importing the external-dependency-manager-1.2.183.unitypackage by itself. This doesn't seem to happen whenever I import a bundled dependency such as FirebaseAnalytics.unitypackage - the external dependency manager shows up after changing platforms. Let me reach out to our engineers to have a look. Thanks!

@Shadowing1983
Copy link
Author

Shadowing1983 commented Sep 25, 2024

Thanks so much @argzdev This is a huge problem for me I need Cocoapods working for AdMod on IOS to work.
So I don't understand. If I import FirebaseAnalytics.unitypackage It will add External Dependency Manager and then it will show up in my editor?

Well I tried that and it did add External Dependency Manager but still not showing up in the Unity Menu. Unless I'm miss reading you? I Imported FirebaseAnalytics.unitypackage by simply double clicking the Unity Package and selecting Unity 2022.3.46

oh and I get this error when I import FirebaseAnalytics. Maybe thats why

System.TypeLoadException: Could not load type of field 'Firebase.Editor.Measurement:analytics' (4) due to: Could not resolve type with token 0100003e from typeref (expected class 'Google.EditorMeasurement' in assembly 'Google.VersionHandlerImpl, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null') assembly:Google.VersionHandlerImpl, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null type:Google.EditorMeasurement member:(null)
at Firebase.Editor.AndroidSettingsChecker..cctor () [0x00015] in /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/editor/app/src/AndroidAPILevelChecker.cs:37

@argzdev
Copy link
Collaborator

argzdev commented Sep 25, 2024

Well I tried that and it did add External Dependency Manager but still not showing up in the Unity Menu. Unless I'm miss reading you? I Imported FirebaseAnalytics.unitypackage by simply double clicking the Unity Package and selecting Unity 2022.3.46

Yes, after that once you change the platform to Android/iOS that should be enough to show the External Dependency Manager option under the Assets menu. In your case, the issue seems to be

Just a hunch, but do you have the iOS platform installed? If so, could you also check if your Xcode is updated to the latest version, and see if that makes any difference?

Also another thing you could try is deleting the Assets/ExternalDependencyManager, and then reimporting.

Let me know if those options work.

@argzdev argzdev added the needs-info Need information for the developer label Sep 25, 2024
@Shadowing1983
Copy link
Author

Shadowing1983 commented Sep 25, 2024

Using Xcode Version 16.0

Ya saw you mention you changed platforms back and forth so I did try that as well. and still no go.
What is the IOS platform? OH you mean like do I do my builds with a IMAC with xcode then ya I do.
Or you mean do i have the IOS sdk installed for Unity. Yes I do. Its IOS is the reason I need cocoapods

Ya I removed ExternalDependencyManager before I tried the Firebase route

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels Sep 25, 2024
@argzdev
Copy link
Collaborator

argzdev commented Sep 25, 2024

Thanks for the quick response, and trying those out.

What is the IOS platform? OH you mean like do I do my builds with a IMAC with xcode then ya I do.

By this, I mean installing the iOS platform within your Unity Editor. Right now, there's an odd issue where the external dependency manager doesn't work correctly #412 if the iOS platform is not installed within the Editor. Not sure if this is related.

Screenshot 2024-09-26 at 1 16 43 AM

@Shadowing1983
Copy link
Author

Shadowing1983 commented Sep 25, 2024

Ahh ok. Ya IOS is installed :P Always install it when I download a new Unity version.
I Just did a IOS build in Unity. Well a build to Xcode to be more precise lol

What Unity version did you test it on?

@argzdev
Copy link
Collaborator

argzdev commented Sep 27, 2024

Interesting, not sure why I'm having a different behavior compared to yours. Here's the steps I took to try and reproduce the issue:

  1. Use Unity Editor version 2022.3.47f1
  2. Create a clean new project
  3. Download ED4MU version 1.2.183 from release page
  4. Use Assets > Import Package > Custom Package and select external-dependency-manager-1.2.183.unitypackage.
  5. Use Assets > Import Package > Custom Package and select GoogleMobileAds-v9.2.0.unitypackage.
  6. Add random test ads ID in Google Mobile Ads setting for iOS.
  7. In File > Build Settings switch platform to iOS.
  8. Build And Run
  9. Opens up Xcode, and run the app in simulator iOS version 18.0, so far there are no build errors in the console. But the app will crash due to having an invalid ID. Uncaught exception: GADInvalidInitializationException: The Google Mobile Ads SDK was initialized without an application ID This is expected.

Am I missing anything? It's possible that you might be encountering a conflicting duplicate library of the ED4MU of GoogleMobileAds, since its .unitypackage also contains an ED4MU. Could you try creating a clean project and see if you're able to reproduce the same behavior? If so, any chance you could share that with me so I can investigate this further? Thanks!

@Shadowing1983
Copy link
Author

Created new project with version 2022.4.47
Imported ED4MU
Changed to IOS

And EDM shows up with no errors in under Assets
I notice when I click cocoapods there is just a thinking icon for a couple seconds. So I assume that means it installed?

Ya so Idk why this works on a empty project. Could it be because I have MobileDependencyResolver installed?

@Shadowing1983
Copy link
Author

So I removed MobileDependencyResolver and installed ED4MU and now it shows up under assets.
When I click cocoapods though nothing happens though. Not even thinking icon for a few seconds like on the Blank Test project

@argzdev
Copy link
Collaborator

argzdev commented Sep 27, 2024

Ya so Idk why this works on a empty project. Could it be because I have MobileDependencyResolver installed?

That's most likely the case, you can only have either one of the resolver. Having both will result to runtime errors or unexpected behavior. At the same time, having the overlapping functionalities will cause potential conflicts.

When I click cocoapods though nothing happens though. Not even thinking icon for a few seconds like on the Blank Test project

From my understanding, you already have Cocoapods installed. You shouldn't need to install Cocoapods for every project. But for reference, if I click Install Cocoapods, it shows me the following image (Since Cocoapods is already installed):

Screenshot 2024-09-27 at 9 08 59 PM

Perhaps you need to do a clean re-import of your dependencies including the ED4MU(?)

@Shadowing1983
Copy link
Author

Ya no window pops up like that at all for me.

Lets say I do get CocoaPods working. Do I have to do something special on my IMAC to make it work? I remember last I did this years back I had to do some extra stuff just to get to work with admods before each IOS build. Then the issue needing cocoapods went away. Now i need Cocoapods back again to use AdMod on IOS. its so annoying and also depressing. I'm busying enough with full time game development to have problems like this. Plus when Advertising makes up 5 percent or less of my income. Most my income comes from micro buy's. I notice I can't get Legacy Unity Ads working either says its missing something as well.

I'll delete my Lib folder and do a full rebuild of it now with me only having one resolver and see how that goes.

@Shadowing1983
Copy link
Author

I rebuilt the Lib folder and still clicking Install Cocoapods does nothing. can't even find anything about this online either geez

@argzdev
Copy link
Collaborator

argzdev commented Sep 30, 2024

Do I have to do something special on my IMAC to make it work?

Not that I'm aware of. However, I don't have enough expertise with regards to iOS builds.

Then the issue needing cocoapods went away. Now i need Cocoapods back again to use AdMod on IOS. its so annoying and also depressing. I'm busying enough with full time game development to have problems like this

I'm sorry you're having issues with this. There's very limited help we can provide given that I'm unable to reproduce this behavior. However, I do think that the main problem might be the missing installation of Cocoapods. In any case, if you encounter more issues with the installation of Cocoapods, you'll most likely get more assistance in the Unity forums regarding the setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-attention Need Googler's attention type: question
Projects
None yet
Development

No branches or pull requests

3 participants