OpenXR
39 TopicsMRTK 3 Pinch Recognition On HoloLens 2
Hi everyone, this is my first time posting here. Please let me know if I messed up something in this post. I am optimizing a HoloLens 2 application developed with MRTK 3 in Unity, and I have been trying to improve the sensitivity of pinch recognition. In other words, what I wish to achieve is that the object manipulators in the application are only activated by pinching when the user’s thumb-forefinger distance becomes 0 (or at the least very close to 0). I set the pinch open threshold and the pinch closed threshold of the hands aggregator subsystem of MRTK 3 to 0.08 and 0.03, hoping that MRTK 3 will only recognize pinch in the more sensitive way mentioned above. However, the object manipulators are still activated by pinching even when the user’s thumb and forefinger are quite far away (about one half of the length of the user’s forefinger) from each other. Is this because of the hardware limitation of HoloLens 2? Is there any possibility that I can improve the pinch recognition on HoloLens 2? Big thanks in advance!21Views0likes0CommentsUnity App Stuck Loading On HoloLens 2
I am following this document andthis tutorialto test AR on a HoloLens 2, and I go to the part where I have a Unity game with all the proper setup (ie. build settings are correct, I used Unity AR feature tool, etc.) and with 2 squares. I built the project and opened the solution, and then I set the configuration to "Release," platform to "ARM64," and set it to "Device" because I have the HoloLens directly connected to my laptop. I selected the Unity app solution and right-clicked it to "Set as Startup Project." Then, I pressed the green button next to "Device" to build and deploy it. The first time, I got prompted to enter a pin after a bit, which I did, and once the deployment was done, the app showed in the "All Apps" section, but once I clicked on it, I got a window that had a white background with a box with an X in the middle of the screen. On top, there is a blue circle with a white loading circle that was loading for forever. I tried rebuilding it multiple times, recreating the Unity project in a new project, and double-checking my Unity build settings, but those were correct. How can I fix this issue? I'm using Unity version 2022.3.20f1. Thank you, Avinash Devineni Edit: Now it started doing the environment scanning visual, but still shows a white box, although there is no blue loading circle anymore. I didn't change anything or redeploy it to the HoloLens 2, so I'm not sure why it started doing something different.222Views0likes0CommentsWatch Kubota Environmental Engineering Use Cases Leveraging HoloLens 2!
Kubota Environmental Engineering (Japan) and Meister Corporation teamed up to develop technology for optimized inspections of infrastructure with HoloLens 2. Read the full story and video: English: Story + Video Japanese: Story + Video314Views0likes0CommentsQR code tracking on Android with MRTK3: IL2CPPLinkage error when building library
Unity Building Library failed, IL2CPPLinkage error, with MRTK3 and QR Code Tracking on Android I tried to track a QR code with MRTK 3 and Andriod. have used this attachment The following error occurs when building on Android: Building Library\Bee\artifacts\Android\d8kzr\libil2cpp.so failed with output: Library/Bee/artifacts/Android/d8kzr/soo2_.QR.DotNet.o: In function `IL2CPPLinkage_WindowsGetStringRawBuffer_m43E89486907592139AB0D52752B2D8D483E4FEE6': H:/projects/**/Library/Bee/artifacts/Android/il2cppOutput/cpp/Microsoft.MixedReality.QR.DotNet.cpp:1395: undefined reference to `WindowsGetStringRawBuffer' H:/projects/**/Library/Bee/artifacts/Android/il2cppOutput/cpp/Microsoft.MixedReality.QR.DotNet.cpp:1395: undefined reference to `WindowsGetStringRawBuffer' Library/Bee/artifacts/Android/d8kzr/soo2_.QR.DotNet.o: In function `IL2CPPLinkage_WindowsDeleteString_m8175860EEA9E79F2F530A1EC165CE65FDD475933': H:/projects/**/Library/Bee/artifacts/Android/il2cppOutput/cpp/Microsoft.MixedReality.QR.DotNet.cpp:1405: undefined reference to `WindowsDeleteString' H:/projects/**/Library/Bee/artifacts/Android/il2cppOutput/cpp/Microsoft.MixedReality.QR.DotNet.cpp:1405: undefined reference to `WindowsDeleteString' clang++: error: linker command failed with exit code 1 (use -v to see invocation) UnityEditor.GenericMenu:CatchMenu (object,string[],int) I have tried the following to fix the error: [DllImport("__Internal")] Metodes removed from IL2CPPLinkage class in the Platform.cs file Search for "WindowsGetStringRawBuffer_m43E89486907592139AB0D52752B2D8D483E4FEE6" in the build output, but nothing found1.5KViews1like2CommentsOpen PDF Document in Hololens 2 from the file browser
I am trying to open a pdf document located in the persistent data path, in the file explorer, in the hololens 2 device but when trying to open it by c# code in Unity, nothing happens. I've tried with the code provided in the question locted inthis linkand it appear to happen an exception that sais this: "Exception of type 'System.Exception' was thrown". Does anyone know what is happening and how can I fix it? This is the code I've used to do it: using UnityEngine; using UnityEngine.Networking; using System; using System.IO; using System.Collections; using System.Diagnostics; using TMPro; using System.Threading.Tasks; #if !UNITY_EDITOR && UNITY_WSA using System; using System.Threading.Tasks; using Windows.System; using Windows.Storage; using Windows.Storage.Streams; using Windows.Data.Pdf; #endif public class PdfDownloader : MonoBehaviour { public string pdfUrl = "https://grados.ugr.es/primaria/pages/infoacademica/archivos/ejemplostfg/!"; public string destinationPath = "my-file.pdf"; int pg = 0; // Definir e inicializar la variable pg [SerializeField] private GameObject PDFPlane = null; [SerializeField] private TextMeshProUGUI text = null; #if !UNITY_EDITOR && UNITY_WSA PdfDocument pdfDocument; #endif public void download() { StartCoroutine(DownloadPdf()); } IEnumerator DownloadPdf() { UnityWebRequest www = UnityWebRequest.Get(pdfUrl); yield return www.SendWebRequest(); if (www.result != UnityWebRequest.Result.Success) { UnityEngine.Debug.LogError("Error al descargar el archivo PDF: " + www.error); } else { string filePath = Path.Combine(Application.persistentDataPath, destinationPath); SaveFile(filePath, www.downloadHandler.data); UnityEngine.Debug.Log("Archivo PDF descargado correctamente en: " + filePath); text.text += "Archivo PDF descargado correctamente en: " + filePath+ "\n"; // Abrir el archivo PDF LoadAsync(); text.text += "Abierto" + "\n"; } } void SaveFile(string path, byte[] data) { try { // Crear el directorio si no existe string directory = Path.GetDirectoryName(path); if (!Directory.Exists(directory)) { Directory.CreateDirectory(directory); text.text += "Creado" + "\n"; } // Escribir los datos del archivo en el archivo especificado File.WriteAllBytes(path, data); text.text += "Escrito" + "\n"; } catch (Exception e) { UnityEngine.Debug.LogError("Error al guardar el archivo: " + e.Message); text.text += "Error al guardar el archivo: " + e.Message+ "\n"; } } public async void LoadAsync() { string path = Application.persistentDataPath; #if !UNITY_EDITOR && UNITY_WSA text.text += "Empiezo "+ "\n"; try { StorageFolder storageFolder = await StorageFolder.GetFolderFromPathAsync(path); /*StorageFolder storageFolder = KnownFolders.CameraRoll;*/ text.text += "Empiezo 2 "+ "\n"; StorageFile sampleFile = await storageFolder.GetFileAsync("my-file.pdf"); text.text += "Empiezo 3 "+ "\n"; //pdfDocument is an instanced object of type PdfDocument pdfDocument = await PdfDocument.LoadFromFileAsync(sampleFile); text.text += "Folder path 2: " + storageFolder + "\n"; } catch (Exception e) { text.text += "1: " + e.Message; } text.text += "listo"; #endif } public async void ChangePageAsync() { text.text += "Voy" + "\n"; #if !UNITY_EDITOR && UNITY_WSA text.text += "Empiezo "+ "\n"; //pg is the page to load using (PdfPage firstPage = pdfDocument.GetPage((uint)pg)) { InMemoryRandomAccessStream stream = new InMemoryRandomAccessStream(); await firstPage.RenderToStreamAsync(stream); MemoryStream tempStream = new MemoryStream(); await stream.AsStream().CopyToAsync(tempStream); byte[] imgBytes = new byte[16 * 1024]; imgBytes = tempStream.ToArray(); Texture2D imgTex = new Texture2D(2048, 2048, TextureFormat.BC7, false); imgTex.LoadImage(imgBytes); imgTex.filterMode = FilterMode.Bilinear; imgTex.wrapMode = TextureWrapMode.Clamp; MeshRenderer meshRenderer = PDFPlane.GetComponent<MeshRenderer>(); Material mat = meshRenderer.material; mat.SetTexture("_MainTex", imgTex); mat.mainTextureScale = new Vector2(1, 1); text.text += "pg: " + pg + "\n"; } #endif } } In the code, I first download it and then try open it. The text.text are debugging lines I've added. The pdf URL is an example pdf obtained from google. I want to show using an Unity app a pdf that has been downloaded before a pdf, avoiding the limitations tah hololens 2 has when opening a local file.550Views1like0CommentsObjects not anchored in Hololens 2 after building from Unity
Hello all, I hope I found the right spot to put this. I am having an issue with porting one of our apps from Magic Leap 2 to Hololens 2 in Unity. After setting up MRTK into the project and hooking a few things up, I build the project for UWP and deploy to the device. When running the app, all objects in the scene move with the camera instead of staying anchored to their position. If I setup MRTK in an empty project and deploy, objects in the scene however are anchored appropriately. I am not sure what is possibly causing this, but I imagine there is some setting or error within my project. I do not have much experience with Hololens development. Things I have tried: -Disabling unnecessary DLLs from being loaded for UWP -Fixing any exceptions thrown shown in the Player Log file -Updating any conditional compilation tags so code from other platforms do not run unintentionally -Checking MRTK project/build/prefab settings against empty project that is successful Perhaps someone here is aware of what triggers this and could potentially point me in the right direction. I am using Unity 2022.3.11. Thanks in advance!415Views0likes0CommentsHololens 2 app reading data from PLC
Hello, I am working on an application for my final project. The application is very simple, I work with a PLC S7 1200 to obtain data from the DB variables of the program and represent this data in Hololens 2. The PLC will be connected via ethertnet to a Wifi router. For the communication with the plc from unity, I use a library called S7netplus. In the simulation inside unity it works correctly as the PC is connected to the router and I get the data from the PLC. The problem comes when importing the application to the hololens 2. When trying to communicate with the ip of the PLC it never works. We have realised that it is not possible to ping the glasses from the computer. If someone could help me I would be very grateful.361Views0likes0CommentsUrgent: My App 3d content are not showing in the HoloLens
Hello Everyone, I have been facing an issue for trying the app I made using Unity in the HoloLens, when I test the app through Microsoft Visual, I can see for example the cube but when I publish the app and upload it to the portal, when I run the app using the HoloLens, no any 3d objects are showing. Can any one please help me in this urgent issue. Thanks in advance. Sam595Views0likes1CommentBuild error"The local machine does not support running projects complied for the ARM64 architecture"
Hello, I've been getting errors recently where I cannot build an ARM64 project for UWP on Unity3D. On Unity, it states in the build settings that"The local machine does not support running projects complied for the ARM64 architecture". And when I try to actually build the application, I get these error messages (second image). I have all the correct packages from Visual Studio 2022 and this still doesn't work for me. Does anyone know what the issue is? Thank you!