This month, the members at LearnHoloLens.com learned how to have a character sit on a virtual chair and next month they will learn how to actually have the character pick a seat in the real world and sit down.
This week, I’m showing off a demo of having an animated character spawn, pick a seat, walk to the seat, turn around and sit down in the seat.
The master class came about because a member wanted to know how to accomplish this task. It was first brought up in one of the monthly Live Q&A sessions, and then discussed a couple of times. There seemed to be enough interest in the topic that two full master classes are devoted to it.
If you are into HoloLens development and want a shortcut to learn practical things that aren’t taught anywhere else, head on over to LearnHoloLens.com and jump on the notification list so you can be notified when the doors open again.
I received a question a few weeks back about getting the Curved VR Keyboard to work on the HoloLens.
The error message appeared to be a reflection issue. UWP has some issues working with reflection because UWP is not managed. It is native and has a projection that allows us to write JavaScript apps or C# apps (and other languages) and it does the projection. This is really nice because we can write code using the language we like and deploy it to the Windows Store.
However, this means that some of the reflection APIs don’t quite work.
In particular, trying to call GetProperty or the like can cause issues. Fortunately, when it comes to Unity this is solved by the Mixed Reality Toolkit. There is a handy extension method that was created on the system’s Type class. The GetBaseType extension method will return the correct base type for UWP as well as when the code is running in the Unity Editor.
This is done using compiler directives (like #if UNITY_WSA && !UNITY_EDITOR ).
If you are trying to use a Unity Asset Store asset, like the Curved VR Keyboard, on the HoloLens or an immersive headset to run in the Windows Store, then you’ll want to avoid using reflection, or if it is needed, make sure you grab the appropriate base type.
Here is a video I created as I blindly tackled the problem.
Around this time last year, I created a HoloLens app called HoloValentine and released it to the Windows Store. Later last year, sometime in November, I updated the code to have it work on the immersive Mixed Reality (or VR) headsets.
Here’s a little demo of how it works on the IHMD (Immersive Head Mounted Displays). I could have spent some time creating an actual environment, but let’s not talk about what might have been…