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

The sample doesnt work with standalone remoting app with Hololens 2 #19

Open
SitronX opened this issue Feb 8, 2023 · 12 comments
Open
Labels
bug Something isn't working

Comments

@SitronX
Copy link

SitronX commented Feb 8, 2023

Overall

It is impossible to use this sample project in Remoting standalone app mode build for Windows while remoting to Hololens 2. In Unity editor, everything works fine.

To Reproduce

It can be easily reproduced just by building the sample project targeting Windows standalone x64 and launching it. It will always give this error on start or anytime there is an attempt to initialize the QR code tracking
vcrt

The error is the same also when remoting is correctly setup in the project and QR setup is only launched after the headset is succesfuly connected to the app on pc.

I have tried to temporarily include all necessary dlls in Windows environment path, which fixed the first error, but subsequently it gives the following error.

NotImplementedd

I have also tried to build the project with Il2CPP to find out if the issue is not only on Mono, but it is unbuildable on both pcs i tried it on. I should have all neccessary things for Visual Studio installed, i even added bunch of old optional stuff from Visual studio installer/Desktop development with C++ section that i figured could be linked to this problem, but no luck. I also build relatively often with Il2CPP and never had build issue like this.

image

I have Microsoft Visual C++ installed from 2005 all the way to 2022
image

I have tried every solution on both different computers, both give the same results.

Due to issue being with something with WinRT library, i have tried also OpenXR branch, which unfortunately gives the same errors. To me it appears there might be something wrong with how the QR tracking is linked to WinRT.

In Editor, there are these two special scripts to initialize important dlls on project start
image
image

Might this be a reason why everything works in Editor, but not in build?

Is there any known solution how to get QR code tracking working while Remoting to Hololens 2 from Standalone Windows app?

@SitronX SitronX added the bug Something isn't working label Feb 8, 2023
@SitronX
Copy link
Author

SitronX commented Feb 10, 2023

I managed to get it working thanks to this closed issue. The main culprit in my case was that the MonoSupport.dll associated with Microsoft.Windows.MixedReality.DotNetWinRT was previously completely missing from my build. Defaultly MonoSupport.dll isnt included in standalone build and must be aditionaly setup to be included, and is very easy to miss. Previously in my project, i had it installed with package manager so it was in completely different location, only when i installed it as nugget and it was together with other dlls i noticed that.

I will leave this issue open, because i still think the project should work correctly with all dlls in plugins folder in build, so dlls relocating or including them in Environment path is not needed and i think this sample project should also contain already mentioned Microsoft.Windows.MixedReality.DotNetWinRT nuget installed here and also setup to be included in build. It is otherwise unnecessary time sink for people in the future trying to figure out what is cause of the issue.

@Jx941206
Copy link

Hello! I come from China, my name is Jiang Xu. Have you solved this problem?

@SitronX
Copy link
Author

SitronX commented Mar 25, 2023

The problem is not solved. But workaround mentioned above works. So you will have to manually copy these specific DLLs files to root folder after every build to not get any errors.

@Jx941206
Copy link

Hello! Thank you very much for your help. Is it convenient to ask which specific DLLs are there?

@SitronX
Copy link
Author

SitronX commented Mar 27, 2023

The previous issue i mentioned lists these DLLs, there is a picture. The change of code that previous issue talks about wasnt needed in my case. Only copying these DLLs solved problems.

@Jx941206
Copy link

I am using the OpenXR branch and the unity version 2020. Is the solution the same? Can you be more detailed? Thank you very much for your help. This problem has been bothering me for several months. In addition, what version of Unity are you using?
微信图片_20230328080131

@Jx941206
Copy link

The exe program I packaged cannot find MonoSupport.dll

@Jx941206
Copy link

Hello! I want to make a friend with you! I would also like to ask you a question about how to achieve a third person perspective through two HoloLens2

@SitronX
Copy link
Author

SitronX commented Mar 28, 2023

I am using 2020.3 version also with OpenXR branch. It is important to have Holographic remoting remote app and Mixed reality features checked, from your image you should be alright. The remoting should be also correctly setup. Here is the sample repo with remoting.

The MonoSupport.dll is trickier, you have to install Microsoft.Windows.MixedReality.DotNetWinRT NuGet, after installation it will be there together with other dlls.

Third person perspective with two Hololens2, like multiplayer? I havent worked with multiplayer, there are some tutorials out there using Photon, like this? But that is offtopic from the issue.

@Jx941206
Copy link

Thank you very much for your answer, I have based on your project

"FnO Hololens2 visualization" solves my problem, but the reason is not yet clear.

@Jx941206
Copy link

Third person perspective with two Hololens2. Two people wearing HoloLens 2 can see the same scene and both can control the objects inside

@SitronX
Copy link
Author

SitronX commented Mar 28, 2023

Well good you got it working.

Third person perspective with two Hololens2. Two people wearing HoloLens 2 can see the same scene and both can control the objects inside

As i said a havent worked with multiplayer yet, so i cant really help. But please keep the discussion with the topic of this issue. This issue is not multiplayer related, this is for another thread. The remoting is for single user only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants