VR Building Errors Meta Quest 2

Hi all,

Im trying to build someone else’s VR Project into a headset for my professor, as they have graduated and are no longer working on the project. it’s running on Unity 2020.2 and old plugin versions of openXR.
I’m fairly new to VR development and they want this project showcased on the Meta Quest 2 Headset.

I attached some images, but if you need anything else to help me, I’ll add more to the post.

whenever I build and run it, it throws up these errors, and I’m unsure where to start when handling them.

Summary
  • Assets\Scripts\SocketWithTagEditor.cs(9,29): error CS0115: ‘SocketWithTagEditor.OnEnable()’: no suitable method found to override

  • Assets\Scripts\SocketWithTagEditor.cs(15,29): error CS0115: ‘SocketWithTagEditor.DrawProperties()’: no suitable method found to override

  • Assets\Scripts\SocketWithTagEditor.cs(2,22): error CS0234: The type or namespace name ‘Interaction’ does not exist in the namespace ‘UnityEditor.XR’ (are you missing an assembly reference?)

  • Assets\Scripts\SocketWithTagEditor.cs(5,36): error CS0246: The type or namespace name ‘XRSocketInteractorEditor’ could not be found (are you missing a using directive or an assembly reference?)

  • Assets\Scripts\SocketWithTagEditor.cs(4,2): error CS0246: The type or namespace name ‘CustomEditorAttribute’ could not be found (are you missing a using directive or an assembly reference?)

  • Assets\Scripts\SocketWithTagEditor.cs(4,2): error CS0246: The type or namespace name ‘CustomEditor’ could not be found (are you missing a using directive or an assembly reference?)

  • Assets\Scripts\SocketWithTagEditor.cs(7,13): error CS0246: The type or namespace name ‘SerializedProperty’ could not be found (are you missing a using directive or an assembly reference?)

Any help is appreciated!

Here is the plugins list

Unity Plugins List

Always start with an empty project and trying to build a blank scene game.

If that works then it proves your basic toolchain installation.

Now integrate the necessary packages for VR. Once you have that going (test it ON the device!), move forward.

Here’s the full gory tree:

How to troubleshoot build failures:

Obviously, if there is actionable data, clues or information within any of the errors, fix those problems. Each error entry may have more information than can fit in the console log so select each error and read the expanded view below it.

If that gives you nothing worthwhile (look to Google! You’re never the first one!), then…

First, make a blank project with a single blank scene and prove that it builds successfully.

If the blank project does NOT build, go fix your Unity installation or your other tools, such as Android SDK, NDK, JDK, etc. It may even be necessary to change to a different version of Unity3D. It is generally best to stay with LTS versions of Unity3D.

Until you can build a blank project to the target platform, don’t fiddle with anything else.

Once you can build a blank project, now bisect the problem by bringing over parts of your current project and building it one subsystem at a time, perhaps stubbing things out that might trigger compiler errors.

Most often things that prevent building are third-party libraries such as Firebase.

Once you identify the subsystem, go to the documentation for it and make sure you are doing it correctly.

It may also be helpful to work through a tutorial or two for whatever subsystem is making the build fail.

Android build not building:

Circa July 2022 here have been reports of Unity’s installer failing to install the Android Tools.

Here was how I brought up Unity2020.3.41 and the Android SDK 31 on October 30, 2022 (edited on August 23, 2023 to include Android SDK 33…) (and again for SDK34):

Android Gradle errors and other related stuff:

1 Like

I did try a blank project, and it did build onto the headset, which was a great idea, thank you. I never really thought about debugging in that sense, but it seems like a no-brainer lol.

I guess there was a custom script the student made called ‘SocketWithTagEditor’ and was overwriting the OnEnable and DrawProperties functions. ChatGPT also thought that those functions might be deprecated and not in the original class, so I checked anyway and they were there.

I’m unsure what they do or if it’s really needed for the program, but after I commented out the entire script, it all loaded onto the headset and seems to be working.

I don’t think the project was QA-tested fully, so I’m assuming that the objects that don’t work in the game are due to the creator’s oversight.

I think some other issues were related to building the Android SDK and having to install ADB drivers, as well as setting the Android API level. However, that’s all assumptions on my end since I’m not even sure what it really does. Again, I’m new to VR development and kind of got thrown into this project lol.

1 Like