mapbox / mapbox-unity-sdk

Mapbox Unity SDK - https://www.mapbox.com/unity/
Other
720 stars 213 forks source link

Errors after importing to Unity 2018.4.20f1 UWP project #1610

Open jasonhbartlett opened 4 years ago

jasonhbartlett commented 4 years ago
brnkhy commented 4 years ago

@jasonhbartlett ah so it couldn't find the dll when build target is set to Hololens? I remember having similar issues with other dlls before but that one is rather new so we probably looked over it. Thanks Jason!

brnkhy commented 4 years ago

@jasonhbartlett are you downloading the package or pulling latest from dev branch? I also think you can just delete test folders as a temporary solution. Looks like NUnit doesn't work for some reason. Maybe it doesn't work with your build target, similar to that other issue?

jasonhbartlett commented 4 years ago

@brnkhy Yeah I'm cloning this repo directly. I just ran through the steps again just to clarify and remove any other unknowns. And I may have discovered something that perhaps may help you figure it out what's going on.

  1. Clone the repo and open in Unity 2017.4.35f1.
  2. Export all folders to a package
  3. Create a new project in Unity 2018.4.20f1
  4. Import the package with all folders.

With that I'm getting those 6 errors. Also, it's NOT popping up the Mabox Setup window (for putting in the access token.

But what I just found is that by going to Build Settings and changing the Architecture from x86_64 to x86 - the errors go away! And the Mapbox Setup window just popped up!

Now testing switching back to x86_64 ..... and... nope... errors NOT returning. I guess that fixed it? I guess it just needed to be temporarily targeting x86 architecture?

Weird. Any idea why that might be the case?

jasonhbartlett commented 4 years ago

Oh, hold up. I do get those errors again if my platform target is UWP. But they only show up when I go and toggle the scripting backend from IL2CPP to .NET or from .NET to IL2CPP. And now they are not going away.

Okay, if I delete the Tests folder under Mapbox/Unity then I don't have those errors any more.

I tried building after that and I did have one build error (other than the one I can fix related to the MapboxAccounts dll ) from my other Issue #1612

Assets\UnityARKitPlugin\ARKitRemote\ObjectSerializationExtension.cs(3,47): error CS0234: The type or namespace name 'Binary' does not exist in the namespace 'System.Runtime.Serialization.Formatters' (are you missing an assembly reference?)

But since I'm not using UnityARKitPlugin I can delete that and its not problem.

So I guess I have temporary fixes for all my issues in Unity 2018.4 UWP

  1. Delete the Tests folder
  2. Add a check for WSAPlayer on the MapboxAccountsUnity .dll

Question: Will this SDK be allowing for switching to the IL2CPP backend at some point as .NET backend is going to be depreciated?

If you have all your notes on this and want to close this ticket, that's good with me. Thanks the work on this.

brnkhy commented 4 years ago

@jasonhbartlett I'm kind of confused, do you think it's IL2CPP setting or UWP build causing this? Because (I think) I remember working with IL2CPP without issues. I was under the impression that it's the UWP causing the issue.