Open oedze opened 2 years ago
We would love to help but need a bit more information, can you confirm the following:
Unity 2020.3.12f1 or higher Up-to-date version of Unity Hub Visual Studio 2017 or 2019 with Universal Windows Platform components Windows SDK version 10.0.18362.0 or higher
And more specifically which versions you are running?
I am getting the same error and also when I try to build it for Hololens I get a FIe Not Found exception for /runtime/plugins/arm64/Microsoft.MixedReality.Sceneunderstanding.dll
Using the setup above and Unity 2020.3.25f1. Unity Hub 3.0.0 Visual Studio 2019 Windows SDK 10.1.20348
Hi @oedze and @marizoldi
Can you please verify something for me?
Please go to Window->Package Manager
Double Check that the SU Unity package is installed
Double check that you are building for UWP ARM64
Just to double check you are both using a Hololens 2 and not a Hololens 1 correct? Any additional information you can provide logs/screenshots will help a lot!
Thanks!
Yes to both. I noticed that it asks me something about Unity Services, which is weird because I am logged in my Unity account. I attach screenshots of what is happening from the Build to the error log.
@marizoldi can you send me a screen shot of your package manager window? Let me know if the Scene Understanding package is installed
You can go to Window ->Package Manager
Yes it is .
@marizoldi
Can you take a look at this directory? does your project have the Scene Understanding DLL for ARM64
yes, this is what I have. If I try to Open the dll I get the warning: Unable to open Packages/com.microsoft.mixedreality.sceneunderstanding/Runtime/Plugins/ARM64/Microsoft.MixedReality.SceneUnderstanding.dll: Check external application preferences.
I don't know exactly what's happening yet.
I would try 2 things here.
Re-install the Scene Understanding package, go to the package manager uninstall SU and re-install it using the Mixed Reality Feature Tool https://docs.microsoft.com/en-us/windows/mixed-reality/develop/unity/welcome-to-mr-feature-tool
If that doesn't work, try a fresh git clone of the project
I'm assuming the package wasn't downloaded properly.
Let me know if that works or doesn't work for you, we can try other things if it doesn't work.
I do meet the Prerequisites and SceneUnderstanding is in the package manager
@marizoldi
Can you take a look at this directory? does your project have the Scene Understanding DLL for ARM64
I think this is the issue for me, The package folder is just empty. I hasn't loaded anything. I am opening the project in Unity 2020.3.25f1 I can't be sure why this is happening though.
Removing and re-adding the package didn't work. I think part of the problem comes from the fact that there are compile errors when I first open it because I use a different version of Unity. It is a higher one though which should work based on the readme, yet it doesn't. Here is a screenshot of the comiplation errors when I tell Unity Hub to open the project with my current Unity editor on safe mode. I hope they give some clues:
@marizoldi I just tried to repro your issue on unity 2020.3.26f1. I did see the same errors you had r.e. numerics, but these are called out in the readme:
Problem:
Multiple errors occur in SceneUnderstandingManager.cs Line 571. System.Numerics.Matrix4x4 converted4x4LocationMatrix = ConvertRightHandedMatrix4x4ToLeftHanded(suObject.GetLocationAsMatrix()); error CS7069: Reference to type 'Matrix4x4' claims it is defined in 'System.Numerics', but it could not be found
Solution:
Go to Build Settings > Player Settings > Other Settings > Api Compatibility Level and select .Net 4.x This setting might revert when upgrading Unity versions
Once I got these resolved I built fine and did not see the missing dll issue. Can you see what happens if you resolve the .net switch and let us know if that helped?
Ok forgot that I did change to net 4.x first time around so these errors are not related.. It doesn't solve the dll not found issue though. The other errors dissappear and I only have two warnings now but still the dll error. the dll is there so it must be something in the settings. Maybe it is very much related to my setup. any idea where to look for?
I don't off the top of my head. Having just done a clean build test on my end that worked for both x64 and ARM64 I would recommend maybe doing a clean setup and seeing if you repro the issues. Then we can work on understanding what is wrong.
Can you confirm that a clean, clone and running in debug on PC (so not arm64) would works?
Secondly, I searched in my library cache for where the arm64 builds exist, I found mine here:
Hi @SzymonSPS, @marizoldi, and @jorgonz I have tried to build and run with UNITY version 2020.3.26f1 and there were no errors. I think the problem was with your(@marizoldi ) local project while cloning the repo or importing the project files dll.
Hi @SzymonSPS sorry for the delay. I did 3 clean build tests, checked the PC build and they both lead to the same resut. The dll is there, I have no idea why tthe build does not see it. It is also in the \Library path., toether with a .meta file. I also deleted the Cache - still the same. I also re-downloaded the package and did everything from start. I don't understand why this happens. What can be so wrong with my setup that it doesn't see a file in the folder it is looking for when the file is there?
Hi sorry, @marizoldi I was out and am just getting back to things. Your error seems to be very unique. After you did your clean setup do you have updated logs, is it just file not found, or are there other errors. Anything new you can share would help.
@SzymonSPS I am facing similar issue as @marizoldi My setup has all prerequisites. I have tried cleansetup, reimport and other things mentioned in this thread
I haven't been able to solve it either. It seems to be related to the local machine.
Hi @marizoldi (and @v0209), I'm a few months late to the party, but I was trying to test out this code today and ran into the same error messages you did. I don't see any errors related to path lengths, but if I shorten my folder names it works. I've gone back and forth a few times and it seems to consistently work/fail with short/long pathnames. Any change that works for ya?
@eyoung2015 this solved it for me! thank you!
Dropping this here for anyone else who's had this issue; This is not a project issue nor is it a SDK issue. This is strictly a Unity issue and, if you're like me, a you issue. Referring to this thread
IF you are like me, you didn't GIT clone but you just downloaded the project right from the project page, unzipped that badboy and went to work only to find tears, sadness and despair. As @eyoung2015 found though, renaming some folders to have smaller names will fix this issue because "MixedReality-SceneUnderstanding-Samples-main/MixedReality-SceneUnderstanding-Samples-main" really fucks with Unity in all of the wrong ways.
I think this issue should be closed, since it's really not an issue w/ the sample.
I am getting a DLLNotFoundException when pressing play in the project in Unity.
Am i forgetting something in the explanation in the README?