Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

SampleProject Error Upon Opening in Unity #52

Closed
DuckAdam opened this issue May 5, 2020 · 15 comments
Closed

SampleProject Error Upon Opening in Unity #52

DuckAdam opened this issue May 5, 2020 · 15 comments
Labels
bug Something isn't working

Comments

@DuckAdam
Copy link

DuckAdam commented May 5, 2020

Describe the bug
A clean clone of the SampleProject repo, and opening unity 2019.3.11f1 generates numerous errors similar to:

"Multiple plugins with the same name 'microsoftgeospatialcompressionnative'"
The full error is:

Multiple plugins with the same name 'microsoftgeospatialcompressionnative' (found at 'Assets/Packages/Microsoft.Maps.Unity.0.7.0/lib/unity/Map/CompressionNative/WSA/arm64/MicrosoftGeospatialCompressionNative.dll' and 'Assets/Packages/Microsoft.Maps.Unity.0.7.0/lib/unity/Map/CompressionNative/Standalone/Windows/x86/MicrosoftGeospatialCompressionNative.dll'). That means one or more plugins are set to be compatible with Editor. Only one plugin at the time can be used by Editor.

To Reproduce
Steps to reproduce the behavior:

  1. Clone the SampleProject
  2. Open SampleProject in Unity 2019.3.11f1

note errors in console

Expected behavior
No errors

Screenshots
N/A

Environment (please complete the following information):

  • Unity version: [e.g. 2019.3.11f1]
  • Maps SDK NuGet Package version: [e.g. 0.7.0]

Additional context
I also noted this problem when adding the NuGet 0.7.0 package to an existing project in an earlier version of Unity.

@DuckAdam DuckAdam added the bug Something isn't working label May 5, 2020
@kircher1
Copy link
Contributor

kircher1 commented May 5, 2020

Thanks for the bug report.

So 2018.4 doesn't support ARM64 backend for UWP and I've seen this happen sometimes where Unity notices the ARM64 DLL, presumably doesn't understand the platform being used, and then falls back to x86, which conflicts with the existing x86 DLL. The result is an error message like this.

It's not an ideal solution, but if you are sticking with 2018.4, you can just remove the WSA/ARM64 directory.

For 2019.3 though, I'm not sure what's happening and I'm unable to repro this on my Unity setup (same editor version too)... Full error log from that may be helpful.

@DuckAdam
Copy link
Author

DuckAdam commented May 5, 2020

I'm happy to help provide any information I can. Unfortunately I'm a noob in Unity and am not sure how to provide the full error log. Is there a dump I can access somewhere? Or do I need to enable logging first? or ?

I did a fresh install of Unity 2019.3.11f1 specifically to open the SampleProject.

On my other project, I got the same errors when I added the maps 0.7.0 nuget package to the project. When I reverted to the older release the errors went away.

@kircher1
Copy link
Contributor

kircher1 commented May 5, 2020

Yeah, here is how you can see the full editor log although I don't recommend uploading it directly to GitHub as there can be some sensitive keys and stuff towards the top, e.g. I can see my license key in the logfile.

So either way, scrub the log or just extract the errors related to the DLLs. That would be helpful!

image

On another note, which players/platforms did you install with 2019.3.11f1? Did you select UWP?

image

That is the dialog I'm referring to from Unity Hub.

Now, I don't think that should actually matter but my thinking is that maybe if you don't have UWP installed, Unity starts defaulting the DLLs back to regular Windows standalone and thus conflicts arise.

@kircher1
Copy link
Contributor

kircher1 commented May 5, 2020

Thanks for the log. I'll take a look and let you know what I find!

@microsoft microsoft deleted a comment from DuckAdam May 5, 2020
@kircher1
Copy link
Contributor

kircher1 commented May 6, 2020

Nothing obvious from the log. It does seem like all the WSA DLLs are all in conflict with the Standalone Windows x86 (and each other) which indicates to me that for some reason Unity reverted the WSA DLL settings that we ship with the NuGet package...

These settings are encoded into meta files that live along side the DLLs. It tells Unity which platform and architecture the DLL can be used on.

To help confirm that this is what happened, will you attach the MicrosoftGeospatialCompressionNative.dll.meta file from this directory? Assets\Packages\Microsoft.Maps.Unity.0.7.0\lib\unity\Map\CompressionNative\WSA\arm

Thanks!

@DuckAdam
Copy link
Author

DuckAdam commented May 6, 2020

sure, here ya go
meta file.zip

@Yonet
Copy link

Yonet commented May 6, 2020

@DuckAdam try reimporting all of the assets. Unity will restart. At that point I was getting an error for duplicate Assembly.info file. If you double click on the error message, it will open the file it is talking about. I've deleted that file and it works fine now.
Screenshot (59)

@kircher1
Copy link
Contributor

kircher1 commented May 6, 2020

I'm attaching the meta files for the WSA DLLs. Try closing Unity, copying this folder over the existing WSA folder here: Assets\Packages\Microsoft.Maps.Unity.0.7.0\lib\unity\Map\CompressionNative\WSA\ and then reopen Unity.

This only has the meta files (not the DLLs), so don't delete the existing WSA folder, just copy and replace overlapping files.
WSA.zip

Let us know if that doesn't fix the errors.

A little more info: The ARM meta file you showed me is completely different than the one shipped in the SDK (different GUID, different settings). My guess is that either Unity removed the true meta files (for an unknown, buggy reason), or maybe when the NuGet package was unzipped, the NuGet plugin didn't actually copy over the meta files for WSA. Either way, if there's no meta file for a DLL, Unity will generate the defaults which are inevitably going to conflict with other generated meta files.

@DuckAdam
Copy link
Author

DuckAdam commented May 6, 2020

I'm attaching the meta files for the WSA DLLs. Try closing Unity, copying this folder over the existing WSA folder here: Assets\Packages\Microsoft.Maps.Unity.0.7.0\lib\unity\Map\CompressionNative\WSA\ and then reopen Unity.

This only has the meta files (not the DLLs), so don't delete the existing WSA folder, just copy and replace overlapping files.
WSA.zip

Let us know if that doesn't fix the errors.

A little more info: The ARM meta file you showed me is completely different than the one shipped in the SDK (different GUID, different settings). My guess is that either Unity removed the true meta files (for an unknown, buggy reason), or maybe when the NuGet package was unzipped, the NuGet plugin didn't actually copy over the meta files for WSA. Either way, if there's no meta file for a DLL, Unity will generate the defaults which are inevitably going to conflict with other generated meta files.

When I did this, the original error went away. I still have other errors but only 2, whereas before I had 4 or so. The errors I have now are:

Multiple plugins with the same name 'microsoftgeospatialcompressionnative' (found at 'Assets/Packages/Microsoft.Maps.Unity.0.7.0/lib/unity/Map/CompressionNative/Standalone/Windows/x86/MicrosoftGeospatialCompressionNative.dll' and 'Assets/Packages/Microsoft.Maps.Unity.0.7.0/lib/unity/Map/CompressionNative/WSA/arm/MicrosoftGeospatialCompressionNative.dll'). That means one or more plugins are set to be compatible with Editor. Only one plugin at the time can be used by Editor.

and

Multiple plugins with the same name 'microsoftgeospatialcompressionnative' (found at 'Assets/Packages/Microsoft.Maps.Unity.0.7.0/lib/unity/Map/CompressionNative/WSA/arm/MicrosoftGeospatialCompressionNative.dll' and 'Assets/Packages/Microsoft.Maps.Unity.0.7.0/lib/unity/Map/CompressionNative/Standalone/Windows/x64/MicrosoftGeospatialCompressionNative.dll'). That means one or more plugins are set to be compatible with Editor. Only one plugin at the time can be used by Editor.

@DuckAdam
Copy link
Author

DuckAdam commented May 6, 2020

@DuckAdam try reimporting all of the assets. Unity will restart. At that point I was getting an error for duplicate Assembly.info file. If you double click on the error message, it will open the file it is talking about. I've deleted that file and it works fine now.
Screenshot (59)

this did not resolve the errors, unfortunately

@kircher1
Copy link
Contributor

kircher1 commented May 7, 2020

I found the issue which was that some of the meta files (related to the Windows based DLLs) are not compatible with Unity 2018.

CompressionNative.zip

Attached is the working set of meta files. Copy and replace the overlapping files in Assets\Packages\Microsoft.Maps.Unity.0.7.0\lib\unity\Map\CompressionNative.

If the sample project was first imported into 2018, the invalid meta files would have been replaced with the defaults, leading to these conflicts/errors. Upgrading to 2019 wouldn't help at that point, although uninstalling and reimporting the package within 2019 should.

For folks still using 2018 or imported 0.7.0 into 2018 and upgraded to 2019, use the attached meta files to get rid of the errors. We'll ship a fixed set of meta files in the next release.

@DuckAdam
Copy link
Author

DuckAdam commented May 7, 2020

@kircher1 this did the trick! Thank you!!!

@DuckAdam
Copy link
Author

DuckAdam commented May 7, 2020

To be clear, however, I opened the SampleProject from a fresh git clone in a fresh installation of unity 2019.3.11f1. I'm not sure how things got into that state, but your meta files did fix the issue.

@HKBSC
Copy link

HKBSC commented May 9, 2020

I had same issue on 2019.2.6f1 after updating from Maps SDK 0.5.1 to 0.7.0 and the meta zip fixed the issue

@kircher1
Copy link
Contributor

kircher1 commented May 9, 2020

0.7.1 is out now and includes the updated meta files here. Check out Getting Started docs for instructions on updating.

@kircher1 kircher1 closed this as completed May 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants