hololens | HoloLens projects. - | Game Engine library
kandi X-RAY | hololens Summary
kandi X-RAY | hololens Summary
HoloLens projects.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of hololens
hololens Key Features
hololens Examples and Code Snippets
Community Discussions
Trending Discussions on hololens
QUESTION
I'm getting the data from HoloLens 2 eye tracker using the SpatialPointerPose API like this (safety checks not given for brevity):
...ANSWER
Answered 2022-Apr-01 at 12:10Holographic Remoting uses clock synchronization which means that timing is correct. The result and accuracy of SpatialPointerPose::TryGetAtTimestamp
depends on the given timestamp. For instance, if the given timestamp is older than the last received pose data on the remote side, then the returned SpatialPointerPose
will be an exact interpolation of received pose data values. If the given timestamp is newer than the last received pose data on the remote side, then Holographic Remoting predicts the SpatialPointerPose based on the latest pose data available.
QUESTION
I have a client-server app. The client is HoloLens 2 and the server is unity running on PC. I have created a socket using HoloLens but I can't read the byte array on HoloLens. In the connect method _inputStream and _outputStream are System.IO.Streams.
PC client uses System.Net.Sockets.TcpClient
, System.Net.Sockets.NetworkStream
but UWP (HoloLens) uses Windows.Networking.Sockets.StreamSocket
.
In the ReceiveCallback I have an issue with int byteLenght = _inputStream.EndRead(result);
When I tried this code on HoloLens I got the exception: "System.ArgumentException: The specified AsyncResult does not correspond to any outstanding IO operation". But I tested it with PC client (System.Net.Socket) and everything works fine.
Btw, I gave all related permissions.
How can I read byte array in UWP app?
Update:
...ANSWER
Answered 2022-Mar-24 at 08:23When I tried this code on HoloLens I got the exception: "System.ArgumentException: The specified AsyncResult does not correspond to any outstanding IO operation".
Please refer to BeginRead
method document, In the .NET Framework 4 and earlier versions, you have to use methods such as BeginRead and EndRead to implement asynchronous I/O operations. These methods are still available in the .NET Framework 4.5 to support legacy code; however, the new async methods, such as ReadAsync, WriteAsync, CopyToAsync, and FlushAsync, help you implement asynchronous I/O operations more easily. I suppose this old api could not compatible with HoloLens device, so please try to use ReadAsync
to replace like the following
QUESTION
I use HoloLens 2 as a client and my unity server on my PC. (More discussion about this: How can I read byte array coming from server in UWP app?) I lost my debug await reader1.LoadAsync(256);
. I tried everything to get my stream data but I couldn't. I don't want to const value for the buffer I need the exact stream size for the buffer. I tested this and it works only and only if the buffer size and data stream size is equal. Or you can suggest me other approaches?
ANSWER
Answered 2022-Mar-25 at 06:20How can I get Windows.Storage.Streams.IInputStream inputStream length?
IInputStream
of SteamSocket
can't be seek. So we can't get length of steam, That's why we need set a buffer to load input stream all the time until the stream finished.
I checked code above, if you have set InputStreamOptions
as ReadAhead
. It will do the next step, when the 256 buffer fills up, please try to InputStreamOptions as Partial
.
QUESTION
So i have been building Windows Mixed Reality ToolKit (MRTK) example project in Unity, and than attempt to deploy it to the Hololens 2 emulator from the Visual Studio 2019 editor, but every time it failed to run for a different reasons.
Some of the times VS2019 failed to deploy completely with the error:
ANSWER
Answered 2022-Mar-13 at 13:25So after poking around for 2 days, playing with MRTK versions, Unity versions, VS versions, Hololens 2 emulator versions, i have realized that the problem is laying with the extremely long loading time of the Hololens 2 emulator (~15min) which is causing some "timeouts" in VS2019 deployment process
So at first i tried opening the emulator before i deploy the app in Visual Studio, but that didn't help since VS2019 opens its own instance of Hololens 2 Emulator.
Eventually what solved the issue was to deploy as usual (green triangle), letting VS2019' Hololens 2 Emulator instance boot, and than waiting some ~15 minutes until the VS19 is giving a "Deployment failed"
error.
Than VS will pop up a dialog saying "error. do you want to continue?" and select NO.
Don't close the Hololens 2 Emulator.
After that run it again (green triangle) - this time the deploy will succeed, but it will be followed by a runtime error.
Press the red square to stop the run, and most importantly don't close the emulator.
Now try to deploy for the third time - it will take ~2min and it will run as expected.
QUESTION
I'm trying to use ClearScript in Unity, but fail because Unity does not see the DLL.
To be sure, I cloned the project and had the DLLs built. I did this using the instructions from ClearScript.
The goal is to use the DLL on HoloLens, which in turn means I have UWP as the platform and ARM64 as the architecture.
But I also want to have valid references during the implementation in Unity and not have constantly grayed out code because of the scripting symbols (such as UNITY_WSA).
So what did I do?
- Screenshot - I took the dlls out of the output-net4.5-folder and set the api compatibility level in unity to .NET 4.x. The red ones are the dlls that I need and the blue ones only if I realy need to use V8, like already mentioned by the instruction from ClearScript.
- All the dlls, except "..win-x64|86.dll", are managed dlls and should work out of the box in unity. So this are the import settings for the managed dlls and the settings for the unmanaged|native dlls.
So what did I miss or what did I do wrong? I used in the past for example another javascript interpreter, called Jint, where I also just took the managed dll out of the .net-4.5-build folder, imported it under Assets/Plugins/Jint and used it in my code just by adding the using in my classes.
...ANSWER
Answered 2022-Mar-16 at 17:07I'm not sure if I should actually be happy or sad. Unity does what it feels like doing. The whole time (2 days) it didn't want to load the DLL for me. Just now I opened Unity for the 30th time and suddenly Unity recognized the DLL and listed it under references in the vs-unity-project.
So I doubted whether Unity, after making changes in Unity, actually reassembles the VS project.
What did I do to confirm the guess and what do you need to do to solve the problem?
I added a new DLL, this of course was not seen by unity and not referenced in the vs-unity-project. Then I deleted the solution file and the C# project file from the Unity project and restarted Unity. And when I reopened the VS Unity project (by opening a c# script), all the DLLs including the new DLL were suddenly referenced and the usings worked!
QUESTION
Good afternoon!
I'm trying to open a pdf located into knownfolders in an UWP Hololens app without results... Does anyone know how to proceed? I managed to open it and retrieve its page number by using:
...ANSWER
Answered 2022-Mar-07 at 15:31Basically you can turn your stream into a byte array and load these bytes into a texture. Then you can easily set this texture to a quad material to show the image of the pdf page. Here's a exemple of what I've done on a project :
QUESTION
I have encountered the following problem My task is as follows, I need to play streaming video (raw h264 video over UDP protocol) on a 3d object. At the moment I'm using FFmpegInteropX to set a MediaSource to a Windows object.Media.Playback.MediaPlayer. Media Player works in frame server mode, then I subscribe to the videoFrameAvailable event and transmit the resulting frame to Unity
The problem is that the performance on Hololens2 (UWP) is quite low, I can't get enough smoothness and low latency if I use texture sizes greater than 720x720. At the same time, if I run the application on a PC, I can play everything up to 4096x4096 smoothly and without delay. Perhaps someone has some ideas on how to improve performance on Hololens2?
...ANSWER
Answered 2022-Mar-02 at 13:12The problem was copying from CPU to GPU, the SharpDX library allowed copying frames directly to Idirect3dsurface. I'm attaching the code, maybe it will be useful. Direct3D11 helpers is available in the microsoft documentation https://docs.microsoft.com/en-us/windows/uwp/audio-video-camera/screen-capture-video#helper-wrapper-classes
QUESTION
I'm using Unity3D with MRTK for Hololens 2 development.
As you can see in the picture I gat a Square
-Gameobject and a AppBar
-Gameobject. The Square
hast MRTK BoundsControl
attached to it which make it transformable. The user can change the size and rotation of the Square
with the handles.
On every change the user does the AppBar
should stick to the left border of the Square
.
The Object
-Gameobject has a scale of: X: 1, Y: 1, Z: 1.
The Square
-Gameobject has a scale of: X: 0.15, y: 0.15, Z: 0.009.
When I scale the Square
with the handles only the scale of the Object
changes the scale of the Square
is staying the same all the time.
I already tried this code but it doesn't work properly:
...ANSWER
Answered 2022-Feb-23 at 08:55Add an empty object to the edge of the object that gets scale up/down. It needs to be on the edge so that when the main object gets modified, it will remain on the border.
Add this code to a script on the UI:
QUESTION
I'm trying to open a PDF within a Unity app deployed to a Microsoft Hololens 2 using the MRTK. I want to use the integrated Edge Browser, that is able to load within the app and to run simulatenously. Edge by itself is also able to load pdf files. I expected using LaunchUri would open the file from a provided location
...ANSWER
Answered 2022-Feb-22 at 09:32You can try Launcher.LaunchFileAsync to launch a PDF file with Edge. This method required a StorageFile as the parameter, which can be got by FileOpenPicker or GetFileFromPathAsync.
Please refer to the following code.
QUESTION
Is there a way to store and view eye tracking data like the size of the users pupils or the eye motion speed?
I am currently building a hololens 2 application in unity using MRTK. Now I would like to "record", store and view eye tracking data of the user.
...ANSWER
Answered 2021-Dec-02 at 20:21I don't believe you can get pupil diameter but it looks like you could estimate angular speed by measuring the change in gaze direction between frames:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install hololens
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page