As soon as I activate the MeshingSubsystemComponent, nothing appears

When I add a MeshingSubsystemComponent to a Game Object and run it, nothing appears on the screen, not even the controllers and UI in the XR Rig component at all.

If I deactivate the MeshingSubsystemComponent, the controllers and UI in the XR Rig are visible.

If you activate the MeshingSubsystemComponent when the controller's bumper button is pressed while the MeshingSubsystemComponent is inactive, the controllers and UI in the XR Rig component will not be displayed at all. The controller and UI in the XR Rig component will not be displayed at all.

Meshing in Example is quite unstable in operation, sometimes showing nothing at all as well as when it works properly.

Unity Editor version 2022.2.0b8.3023
ML2 OS version:1.1.0-dev2
MLSDK version:1.1.0-dev2
MLSDK (Unity) version:1.2.0
Magic Leap XR Plugin version:7.0.0.pre.1
Host OS: Windows

I have the same issue, ever since I updated to dev2 meshing is crashing the app or Unity when running the simulator.

If you check the release notes they mentioned an issue with meshing and to fix it you have to set a callback before meshing start. Check he meshing example for example.... HOWEVER.....

I added the same piece of code in my Meshing Controller script as the example but the issue is still happening.

1 Like

@jc1 Thank you for the information. If you have implemented the measures described in your release notes and the problem still seems to be unresolved, it seemed to me that it would be in your best interest to wait for a response from Magic Leap for the time being.

If possible, it would be great if Magic Leap could provide an Example code or Unity package for meshing that works reliably with the 1.1.0-dev2 version.

Personally, I think that it is understandable that the OS is not stable because it is a development version of 1.1.0-dev2, but I think it is fatal that the basic meshing functionality of spatial computing does not work.

@kbabilinski
cc @jc1

I see that you have answered in a similar post about the problem of nothing being displayed on the screen when using the MeshingSubsystemComponent, does this mean that the problem will occur if I do not follow this answer?

Are you saying that if I implement it as per the following document, it will be faulty?

Is there a bug in the MeshingSubsystemComponent itself in 1.1.0-dev2? Or has the implementation method of MeshingSubsystemComponent in 1.1.0-dev2 changed from 1.1.0-dev1 and before?

I have no idea what the current state of mesh implementation methods and specification changes are.

@kbabilinski

Please check the release note f dev2 under from the ML Hub packagae manager it says:

Known Issues:
** Before meshing begins, make sure to call SetCustomMeshBlockRequests to set the callback, as there is a known issue currently that could cause a crash If this callback is not set, even if it is not being used. An example of how to do this is shown in the meshing sample provided.*

The following code was added in the example script:

MeshingSubsystem.Extensions.MLMeshing.MeshBlockRequest[] CustomBlockRequests(MeshingSubsystem.Extensions.MLMeshing.MeshBlockInfo[] blockInfos)
        {
            var blockRequests = new MeshingSubsystem.Extensions.MLMeshing.MeshBlockRequest[blockInfos.Length];
            for (int i = 0; i < blockInfos.Length; ++i)
            {
                var blockInfo = blockInfos[i];
                var distanceFromCamera = Vector3.Distance(_camera.transform.position, blockInfo.pose.position);
                if (distanceFromCamera > 1)
                    blockRequests[i] = new MeshingSubsystem.Extensions.MLMeshing.MeshBlockRequest(blockInfo.id, MeshingSubsystem.Extensions.MLMeshing.LevelOfDetail.Minimum);
                else
                    blockRequests[i] = new MeshingSubsystem.Extensions.MLMeshing.MeshBlockRequest(blockInfo.id, MeshingSubsystem.Extensions.MLMeshing.LevelOfDetail.Maximum);
            }

            return blockRequests;
        }

And in Awake

MeshingSubsystem.Extensions.MLMeshing.Config.SetCustomMeshBlockRequests(CustomBlockRequests);

2 Likes