Search Unity

Question Oculus quest 2 not showing game objects appearing on runtime.

Discussion in 'VR' started by Gebray, Oct 6, 2021.

  1. Gebray

    Gebray

    Joined:
    Feb 26, 2021
    Posts:
    10
    Hello there,
    I got a new oculus quest 2 headset a week ago. I have a unity project depicting a debris flow (from a real numerical simulations) where a terrain and the "flows" produced procedurally via script with the flows starting to animate after a play(the "flows" game objects are going to appear on the scene at run time). When I tried to build the project in both standalone and android, I got an ''error CS0115 ...no suitable method found to override'' heading to my unity editor. I added
    Code (CSharp):
    1. #if UNITY_EDITOR  #endif
    and the error was solved. However, after building the project on the android platform, " flows" are not coming into the oculus quest 2. While I can walk inside the terrain, I couldn't see the debris flow coming. the same building on standalone pc gives the expected result (I could see the terrain and the debris flow as if in the project from the built application). What did I miss on the android build setting ?

    P.S: My unity and VR experience is limited.

    Regards,
    Gebray
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,060
    Instead of hiding the code with that if statement, fix the error itself. Only use an if statement like that if you want to run things in the editor and not in a build. Right now all the code within that if statement will only run inside of the editor and not in builds.
    In the script the error pointed out, remove the Override keyword from the function (or if you want to override, make sure the base class is virtual).
     
    Gebray likes this.
  3. Gebray

    Gebray

    Joined:
    Feb 26, 2021
    Posts:
    10
    Hello DevDunk,
    I fixed the error CS0115, I forgot to include the editor scripts to be inside editor folder. However, the original problem persists to exist, still not seeing the flows. Instead I could see a shader warnings
    : "
    Shader warning in 'OvrAvatar/AvatarSurfaceShaderSelfOccluding': use of potentially uninitialized variable (ComputeColor) at Assets/Oculus/Avatar/Resources/Materials/AvatarMaterialStateShader.cginc(168) (on gles3)
    Compiling Vertex program with LAYERS_2 NORMAL_MAP_OFF PARALLAX_OFF PROJECTOR_OFF ROUGHNESS_OFF VERTALPHA_OFF

    Platform defines: SHADER_API_GLES30 SHADER_API_MOBILE UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_LIGHTMAP_DLDR_ENCODING UNITY_NO_CUBEMAP_ARRAY UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_RGBM UNITY_NO_SCREENSPACE_SHADOWS UNITY_PASS_FORWARDBASE UNITY_PBS_USE_BRDF3

    Disabled keywords: LAYERS_1 LAYERS_3 LAYERS_4 LAYERS_5 LAYERS_6 LAYERS_7 LAYERS_8 NORMAL_MAP_ON PARALLAX_ON PROJECTOR_ON ROUGHNESS_ON UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF2 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_VIRTUAL_TEXTURING VERTALPHA_ON "

    Note that I used a shadergraph which includes tiling and offset, UV coordinates saved at each mesh, normal mapping for texturing the flows.