Not long after I wrote a guide on using Unity to build Google Cardboard virtual reality experiences, Google updated their SDK to version 0.6 and changed a few things. Most of these changes weren't too drastic, however there was one rather large change that caused a bit of confusion. The reticle.
What is a Reticle?
It is a rather absurd sounding word that is a synonym for an equally absurd sounding word — a "graticule". Basically, in our situation it is another way of describing a more advanced form of crosshair or target. It is a series of lines that mark out where our VR camera is pointing. In the Google Cardboard SDK, it is a circle by default, that grows whenever it has a new object in its sights and shrinks back down when it does not see an object in its path.
Reticles in the Old Cardboard SDK (v0.5.2 and Below)
In our previous example within the Building a Google Cardboard VR App in Unity article, we used a target image that looked like so:
This was basically an image file that appeared whenever you hovered over a clickable object. We could have it represent anything we wanted, so a crosshair made sense. However, Google have changed their approach to one which does not use images any longer! After quite a bit of digging, I couldn't find a nice and simple way to bring in images once more, however there are a variety of customizations you can do to the Google Cardboard SDK's new reticle concept that should serve the same purpose.
Updating the Google Cardboard SDK
If you are working with an existing project that uses the old SDK, like the demo built in our last article, here's a quick guide to upgrading your app.
To start with, you will need to download the latest SDK from the Cardboard SDK for Unity GitHub repo.
Next, we will want to delete our old Cardboard SDK folder in our assets. Note: Be certain that you have your whole project backed up before upgrading. Also, check that you have not added any of your own custom assets within the "Cardboard" folder before continuing!
Right click your "Cardboard" folder in your assets and choose "Delete":
Then, reimport your new Google Cardboard SDK by going to Assets > Import Package > Custom Package...:
Navigate to your newly downloaded v0.6 Cardboard SDK and select that:
Make sure everything is ticked in the window that appears. You might not need the "Legacy" ones, feel free to untick that and then if you've got any issues, import in the rest by repeating this process. I did not need the "Legacy" items when upgrading my project.
If you now play your scene to test, you'll see everything still works... but any fancy custom crosshair you might have included is missing!
Continue reading %What in the World Is a Reticle? Exploring the Cardboard Unity SDK%
by Patrick Catanzariti via SitePoint
No comments:
Post a Comment