Gerald McAlister | April 28, 2018 | Developer Diary
Yet Another Hands and Fingers Update
It was recently brought to our attention that another update to the Unity SDKs and Oculus SDKs had once again broken several features from our Oculus Rift hands demo. As a result, we went through and updated this project to work again, and wanted to quickly cover what we did to fix these new issues when updating this project to a newer version of the Oculus Avatar SDK and Unity.
The first thing we’ve gone ahead and done is updated to the latest version of Unity 2017 (specifically, 2017.4.1f1). This resulted in several breaking changes due to new API calls for the virtual reality feature in Unity, but this can actually be ignored by most of our things. Our only dependency that needs to be updated is the Oculus Unity Utilities, which will fix any errors you receive when updating Unity.
Update the Oculus SDKs
Updating the Oculus SDKs is pretty straightforward as well. To start, go ahead and just import the Oculus Unity Utilities and Oculus Platform SDK into Unity like normal, dragging them into your workspace. Allow it to overwrite any files it needs to, as this should be fine. Next, start the process of importing the Oculus Avatar SDK, but don’t allow it to overwrite everything. Specifically, we actually want to keep two files the same: the OvrAvatarHand.cs script and the OvrAvatarSkinnedMeshRenderComponent.cs script. Both of these do not need to be updated when you import the new SDKs. If you accidentally do so, see our previous tutorials on how to re-setup both of those files. Another new step you may need to do is provide your platform key to the Oculus Avatar configuration that is now available as well, that way user’s avatar settings are used.
Updating Our PlatformManager Script
You may notice an error after importing regarding our PlatformManager script that we used previously. This is caused by Oculus now including their own PlatformManager script, and Unity not knowing which one to use. The one provided by Oculus does quite a bit more, so we would recommend using ours in the test scene we provided. To fix this error, you can either delete the one Oculus provides, or rename ours to something else (we’ve renamed ours to SimplePlatformManager going forward).
We’ve updated our GitHub project for this to include these fixes, as well as updated the README in the repository with the versions of everything thing we use. We apologize for not catching this sooner, and appreciate you guys reaching out to us! We’ve got a new developer diary that will cover some new things that is going to go up in the next few weeks, so keep an eye out for that soon! Happy developing!