Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.

Meshes disappear

Hi guys,
I have a strange Problem I can't figure out: I'm using the following function to show a preview of the spatial mapping mesh as a miniature to the user. It gets called every 5s while scanning the room.

private void ShowPreview()
    {
        Debug.Log("Update Preview");
        Destroy(GameObject.Find("RoomPreview"));
        GameObject newRoomPreview = new GameObject("RoomPreview");
        List<MeshFilter> meshFilterList = SpatialMappingManager.Instance.GetMeshFilters();

        foreach (MeshFilter meshFilter in meshFilterList)
        {
            GameObject temp = new GameObject();
            //keep mesh's position and rotation
            temp.transform.position = meshFilter.transform.position;
            temp.transform.rotation = meshFilter.transform.rotation;
            temp.AddComponent<MeshFilter>().sharedMesh = meshFilter.sharedMesh;
            temp.AddComponent<MeshRenderer>();
            temp.GetComponent<MeshRenderer>().material = new Material(Shader.Find("Standard"));
            temp.transform.SetParent(newRoomPreview.transform);
        }

        newRoomPreview.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f);
        newRoomPreview.transform.localPosition = new Vector3(0f, 0f, 1f);
    }

The strange thing now is, that at the very beginning of every 5s interval, the full updated room mesh gets displayed, but immediatly after that, parts of the mesh begin to disappear (but not everything!). This continues on and on in every interval.
I don't have an idea, why only parts apparently get deleted. Do you have one?

All the best
Nik

Sign In or Register to comment.