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!
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!
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.
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!
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.
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?
Try upgrading to the latest Oculus Android package 1.38.5. See if it can now build.
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.
Some of the sections of code, such as “Grabbing Objects” and “Slicing the Veggies in Half”, have GetComponent( ) methods with no component listed.
I can’t test the game with these empty in the code because they are considered “compiler errors”. Am I just supposed to guess what component is needed in these situations? I mean, it makes sense that the first one is looking for a “Grabbable” script and the other one wants an audio source or something. I’m just checking.
@captain_breadbeard:
This looks like a formatting error on the website is causing GetComponent() to be missing the bracketed text.
I am asking the author team to help get this corrected on the website. Until this is fixed, my suggestion is that you please download the project materials and refer to the ‘final’ project for the correct code for the GetComponent calls.
Thank you for pointing out this problem - I will try to get it amended soon.
Any ideas on how I can still use this to complete the tutorial?
If I hit continue in the second dialog, the project does open up, but I fear that it will cause issues down the line as I see messages like this on the bottom bar: image|690x14
Hi @sheepmstr99, the best way to resolve this issue is to install Unity 2019.2.x series - see the Getting Started section. The project was written using 2019.2, and you are trying to downgrade the project which is generally not recommended with Unity.
If you need to work in 2018.4.x, send me a message. I could export the assets as a .unitypackage to be reimported into a clean 2018.4 project.
Hey Matt, thanks for creating this! I was doing fine until I got to the Slicer components, edited the code, and now I’m getting this. Any idea how to fix? Thanks.
UnityEditor.BuildPlayerWindow+BuildMethodException: Error building Player because scripts have compile errors in the editor
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:190
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:95
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
Thank you for the tutorial! I am having some trouble however. I am not getting any errors on my build but the hands will only track one at a time and only after you hit the trigger button on the Oculus Quest controller (so if I hit the trigger on the left controller the left hand begins to move in the scene but the right one freezes at its last location before the trigger squeeze…and vice versa if I hit the right trigger). Also, no animations are happening and the light sabers do not move or track with the hands when collided with and the grip and trigger are engaged. I followed the directions closely, but when I started adding the prefabs I discovered the mesh and shaders/textures were not attached. I am new to all this so did my best to reattach them. I also noticed the Animator tab had the parameters but only the Idle animation had a transition to it. I tried to add the other animations as I understood them and to use the bool parameters and TriggerDown parameter to transition. However, I fear something did not import correctly and that is causing the problem. I am using Unity 2019.20f1. Any help would be appreciated!