Something broken after updating my VR project

Hi, after updating my project in VR something broke and now, when my app starts, after a couple of seconds it starts to lagg and checking my console I get a lot of errors related specifically with the planes :


And also I get a lot of warnings like the screen shot

Do you know what could be happening ?

Hi Diegoeloko! I’m your friendly AI powered assistant. I can help with questions regarding Needle Engine, three.js, and basic Unity or Blender help. Please reply with your question and provide the OS, Needle Engine version, and Unity or Blender version if applicable, so I can assist you better!

2 replies left - GPT 4O
thread_GqwS9lgMyHbm790j5glvDHaV
Reply to this message to continue the conversation

OS : Windows 11
Needle Engine version : 3.47.2
Unity : 2022.3.15

The next error I got it for each object which has a Plane component :

Error while resolving references (see console for details)
 TypeError: Cannot read properties of undefined (reading 'primitives')
    at Q3.loadMesh (register_types-be3eb5e1.js:1042:43697)
    at register_types-be3eb5e1.js:1042:34875
    at Q3._invokeOne (register_types-be3eb5e1.js:1042:34440)
    at Q3.getDependency (register_types-be3eb5e1.js:1042:34831)
    at rR (register_types-be3eb5e1.js:1142:11732)
    at _S (register_types-be3eb5e1.js:1142:10758)
    at jk (register_types-be3eb5e1.js:1142:10253)
    at V5.createComponents (register_types-be3eb5e1.js:2070:3915)
    at V5.afterRoot (register_types-be3eb5e1.js:2070:3494)
    at async Promise.all (/index 3) _e {isObject3D: true, uuid: '1fa62bc2-4bd0-4b6d-ad9c-ab99d7b6d698', name: 'Quad2_13', type: 'Mesh', parent: Kt, …} {name: 'MeshCollider', guid: '1310305952054630154_1777290942', sharedMesh: '/meshes/249', convex: false, enabled: true, …}

and the next warining i got it a lot of times also :

Type function Function() { [native code] } is already registered mW {name: 'ObjectSerializer'} UW {name: 'ComponentSerializer'}

Hi Diegoeloko! Based on the errors you’re encountering regarding the Plane component, it seems that there may be issues with uninitialized or improperly referenced properties in your objects.

  1. Error Related to Undefined Properties:

    • The TypeError “Cannot read properties of undefined” often suggests that the script is trying to access a property on an object that hasn’t been fully initialized or loaded. Make sure all mesh dependencies are loaded correctly and that your objects are instantiated properly before accessing their properties.
  2. Warning about Function Type Registration:

    • The warning “Type function Function() { [native code] } is already registered” indicates that there may be a conflict with the type registration. This could happen if the same component/script is registered multiple times. Ensure that your components are not being redundantly instantiated.

Suggestions to Resolve:

  • Check the initialization sequence of your objects. Ensure that all dependencies are resolved before attempting to access their properties.
  • Search for duplicated component registrations in your scripts.
  • Verify that resources like meshes are being correctly loaded and are available before they are referenced.

Let me know if you need further assistance!

1 replies left - GPT 4O
thread_GqwS9lgMyHbm790j5glvDHaV
Reply to this message to continue the conversation

Hi,

Are you using Unity or Blender?
It seems like the Plane mesh can’t be loaded - can you reproduce this with just this one mesh object in the scene?

I tried and I found that the component that was producing the error were the Mesh Colliders from some objects so I did a search in Unity like “t:MeshCollider” and eliminate all the objects which has a MeshCollider just to try. Then I built again the project and there were no more errors related with that although the warnings remained. But now the problem is that, In my Oculus Quest 2 I open the app into a window browser and it works, but when I click the “Enter VR” it keeps loading with the black screen and the white dots of loading. And there are no errors in the console.

I’m struggling doing my update I was debugging some things when I re opened my project after shutting down my computer, there are some scripts missing and some warnings in the console.
Some scripts which are missing for example are SyncedRoom, Networking, DragControls, etc.
About the warnings, my console plot the next warnings :

Hi, do you see any Error message in your console?

No, there are no errors. After changing between git branches, something fixed it and now those scripts finally loaded. I continue updating my project but there are some common warnings which I suspect that may be related with that lag while I am in VR. The warnings (web console) are the follows :

This is while I run the app locally , with the “Play”

This is in my deploy :


Those errors appear about 630 times in the console. Do you know why could be happening ?

This is my Unity console when I hit Play , and now the latest warnings are not showed :

Sorry to jump on this @diegoeloko . Just wanted to say that I also had both these issues, in the same order. I first got the error related to the “primitives” which for me also came from simply having the default plane with a mesh collider. I too had to remove them.

I have also been getting the hundreds of warning outputs in the console. Commenting in case there is anything I can also provide (logs, feedback etc) that would help the Needle team hunt down the cause.

Thanks for sharing @nostalgicbear . I’ve been stuck with those errors and is good to know that I’m not alone haha. Hope the Needle team can check it.