Group Group Group Group Group Group Group Group Group

Veggie Saber – Introduction to Unity Development with the Oculus Quest | raywenderlich.com

In this tutorial, you’ll learn how to develop and deploy a game for Oculus Quest in Unity by developing Veggie Saber, a Saber VR game featuring tasty veggies!


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4912095-veggie-saber-introduction-to-unity-development-with-the-oculus-quest

Two items of concern poped right up on page 3, of “Veggie Saber.”

The first is that the "inspector doesn’t contain an option "Background Type.’ I chalk that up to maybe the later version of Unity (I’m using 2019.1.9f1) no longer offers that opton?

MY second concern is the statement “Add a Tracked Pose Drive” component! There is no such animal. It’s not included in the list of .cs provided, nor can I fine it in the “Add Componet” option of the inspector.

I admit to being a neophyte - but I have been playing around with Unity for about six months!

Art

Hi Art,

Thank you for pointing out the change with the Camera ‘Background Type’. This has now been renamed in the newer Unity versions as ‘Clear Flags’ . I will update the tutorial image to reflect this.

On the second issue, check that you have the Package “XR Legacy Input Helpers” added to your project. This should be found in the Project view under “Packages”, otherwise please go to the Window->Package Manager and choose to install the missing package.

When you have the “XR Legacy Input Helpers”, you should be able to choose “Add Component” on the Head GameObject and then add a “Tracked Pose Driver” script to keep going on the tutorial.

Thanks for the comments and I will look to update other the change to the Camera.

-Matt (Author)

Would this be difficult to get going for Oculus Go instead of Quest?

I spent a long time looking for quick start guides on how to get something super simple up and running for Oculus Go and found nothing. This guide is exactly what I was looking for… but for Quest!

Hi Elliotw,

The major difference between the Quest and the Go would be having only a single controller. The tutorial would need to be modified to only use one lightsaber and let you begin playing as soon as a single lightsaber is grabbed.

Otherwise, the only other difference might be to avoid using the “V2 Signing(Quest)” when building the application, though this might not have any effects on the Go.

There should be a large overlap between Go and Quest development. Many Go applications can run on the Quest with 6DOF tracking without any changes.

Hi Matt…getting the following error when I try to compile and run the final version.

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.XR.Oculus.OculusManifest.UpdateOrCreateNameValueElementsInTag (System.Xml.XmlDocument doc, System.String parentPath, System.String tag, System.String firstName, System.String firstValue, System.String secondName, System.String secondValue) (at Library/PackageCache/com.unity.xr.oculus.android@1.38.1/Editor/OculusBuildProcessor.cs:60)
UnityEditor.XR.Oculus.OculusManifest.OnPostGenerateGradleAndroidProject (System.String path) (at Library/PackageCache/com.unity.xr.oculus.android@1.38.1/Editor/OculusBuildProcessor.cs:90)
UnityEditor.Android.AndroidBuildPipelineInterfaces.OnGeneratePlatformProjectPostprocess (System.String path, System.Boolean strict) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Android/AndroidPostGenerateGradleProject.cs:39)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

Thanks

Hi fitzsbre,

I couldn’t reproduce the build issue when using Unity 2019.2.15f1 and Oculus Android package 1.38.5. What versions of Unity and Oculus Android are you using to build the project?

That said, I did a search and found a similar bug report here (https://forum.unity.com/threads/error-after-upgrading-from-unity-2019-1-13f1-to-2019-2-5f1.748094/). It is described as a bug in the Oculus Android package.

I suggest you:

  1. Try upgrading to the latest Oculus Android package 1.38.5. See if it can now build.
  2. Try the workaround in the forum thread -> Modify the AndroidManifest.xml to remove the ‘metadata’ line with a ‘vr-only’ attribute. To do this, edit the file in Assets/Plugins/Android/AndroidManifest.xml to remove the line and then try to build the Android APK.

Hi Brilliant tutorial!, im having trouble with unsliced veggies not being removed after the slice trigger, code looks good in slicer.cs ive even replaced sclicer.cs with the one from final folder just in-case i missed something. I know its probably something simple but i cannot find it
Thanks

Thanks, glad you like it! I will guess that likely ‘Destroy’ is not being called on the original veggie.

Q: are the slices of the veggie being instantiated but the original veggie not removed? It could be that a script is breaking - check the logs for an exception.

I will pull up the project tomorrow and see if I can suggest anything else regarding the Veggie prefab itself.