Hi, I am facing some problems with the unity Set-up of this Git https://github.com/TakashiYoshinaga/MRTK-Profiles-for-NrealLight. I followed all the steps, but when I try to build for Android (Nreal) I get errors on the Startup.cs script. 1. The type or namespace name “InitializeOnLoadAttribute” could not be found; 2. The type or namespace name “InitializeOnLoad” could not be found and 3. The type or namespace name “ScriptableSingleton<>” could not be found.
Yeap. I used the 2.7.2… One thing that I am trying is to set up the XR plugin for NReal and then import the MRTK for XR plugin. However, I don’t know if I should use the XR plugin or just use the SDK from NREAL.
@alexandru.damian did you set up your environment just by importing NRSDK and MRTK?
Download the MRTK-Unity v2.7.2. IMPORTANT: I’ve had issues here before, I recommend not using the Mixed Reality Feature Tool and instead Download the SDKs directly from this side: https://github.com/microsoft/MixedRealityToolkit-Unity/releases/tag/v2.7.2
Just scroll down and just to be sure download all 5 of them: The Extension then Extension, Examples, TestUtilities and Tools
Import all of the SDKs (Yoshinaga’s, NRSDK, and all MRTK SDKs) into your project. I recommend importing them in this order.
If you import them in this order you will face the MRTK setup in the end. I recommend choosing the recommended setup and just clicking continue and apply.
Of course also, in the build settings, build for android. Fix all the Nreal requested changes (just click on fix when you converted your project to android). There shouldn’t be any errors now and the setup should be finished.
Now to the most important part.
Let’s say you want to test hand tracking continue to the imported MRTK folder and go to the Examples folder. Next go to demos and open the hand tracking scene.
Now, almost there. Basically the only thing you have to do now is choose Yoshinaga’s Nreal Hand Tracking Profile. You can do this under the “MixedRealityToolkit” Gameobject.
All that is left now is drag in the needed NReal pefabs to get the input right. For this just compare your hierarchy with Yoshinaga’s “Sample” scene from his repo (also included in his Unity package we just imported). Basically you will need to add NRCameraRig and NRInput to your hierarchy.
I hope I didn’t miss anything. I hope this helps and let me know how it goes!
Great! Now you chan choose the Nreal Profile right below “MixedRealityToolkit”.
Now it says “DefaultHololens2ConfigurationProfile”. However, if you imported everything correctly you should be able to choose Nreal Hand Tracking Profile from the dropdown on the left side of “View Asset”.
Also quick tip for everyone struggling: If you don’t see the “Nreal Hand MixedRealityToolkitConfigurationProfile” in the dropdown menu yet, just save your project, close it and start it again. You should be able to see it now.
Hi Robi, I am using the exactly same version of Unity(2019.4.30f1) as you, but I also cannot see the Nreal Hand MixedRealityToolkitConfigurationProfile listed in the dropdown list even after restarting Unity. I could see it by searching manually “nreal”, but just can’t use that profile in MRTK
Hi @pedrolazarimachado , It builds successfully on Unity 2019.4, and compiles, but I can’t get the hand tracking to work properly without importing that Nreal profile; on Unity 2020 it gives me gradle build errors
Here’s the latest update: It seems that the profile suddenly appears after I was struggling to import it for after 10 min, make sure you import everything as expected. However, hand interaction is not working properly even after importing the profile. I will give it a final shot by starting another project and see whether it works. In that case the overhead caused by the integration of MRTK and Nreal glass greatly outweighs the benefits MRTK can bring, and I would rather use NRSDK for building my scene.
not sure if it might help, but every time I setup a project with MRTK I need to do a full reimport, and restart Visual Studio after getting all the packages installed, otherwise it wont work at all for me.
I followed @robi tutorial and it works like a charm…
just that some times the hand tracking is not accurate and the raycast is not aligned with my hand position and the hand tracking experience in general is not that great
All said, its great that hand tracking capability is available in such a compact device for half the price of HoloLens 2