Hello everyone.

We have decided to phase out the Mixed Reality Forums over the next few months in favor of other ways to connect with us.

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.

The plan between now and the beginning of May is to clean up old, unanswered questions that are no longer relevant. The forums will remain open and usable.

On May 1st we will be locking the forums to new posts and replies. They will remain available for another three months for the purposes of searching them, and then they will be closed altogether on August 1st.

So, where does that leave our awesome community to ask questions? Well, there are a few places we want to engage with you. 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. 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.