ProBuilder for Unity is now Free


The title says it all. It is pretty exciting news and if you are working on a VR title, then you definitely need to check it out because it makes creating rooms really simple.

You can watch me create two rooms and a hallway in just a couple of minutes in this week’s video:

Change Unity Default Script Templates

If you are constantly changing your MonoBehaviour classes to have the curly braces start on a new line then this little trick will save you some time.

Browse to your Unity installation folder and then go to the Editor\Data\Resources\ScriptTemplates folder.

e.g. C:\Program Files\Unity\Editor\Data\Resources\ScriptTemplates

Find the file with NewBehaviourScript in the name. For example:

81-C# Script-NewBehaviourScript.cs.txt

Open it in Notepad++ (to easily overwrite the file, but you can open it in any editor)

Make the modifications you want and save the file. If you can’t save it in the same folder, save it somewhere else and then copy it over.

You can see me do this in a super quick video:

Mixed Reality Toolkit Reflection Extension Method

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.

Mixed Reality Game Tutorial Part 13 – Deploying to Devices

This Mixed Reality Game Development Tutorial is the thirteenth and final part in a multi-part series where we created a complete game from scratch.

The goal of this series is to create a full game that will run on the Windows Mixed Reality headsets. While the game is be simplistic in nature, the process shows what all is needed to get a game actually completed.

In this thirteenth session we deployed the game to run on both the immersive headsets as well as on the HoloLens device as well.

I hope you have enjoyed the series.

If you want more in-depth training like this (that is a little more compact) then make sure to checkout

Part 0: Getting Started with Mixed Reality
Part 1: Setup
Part 2: Core Game Logic
Part 3: Game Controller
Part 4: Motion Controller Support / Input
Part 5: Keeping Score
Part 6: Hiding Items and Disabling Input
Part 7: Displaying Score and Strikes
Part 8: High Scores
Part 9: Adding Animation
Part 10: Implementing Animation
Part 11: Adding Sounds
Part 12: Adding Particles
Part 13: Deploying to Devices