Scenegraph - Adding a new mesh component doesn't update the mesh

Summary

If you remove a mesh component from an entity and then add a new mesh component the old mesh component is still shown.

I believe the issue is with removing the old mesh component because even if you remove it, it is still visible which then prevents you from adding a new mesh.

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Verse

Steps to Reproduce

  1. Spawn a new entity in the world (I used a prefab with one entity and mesh component as the only components)

  2. Remove the old mesh component (you will still be able to see it)

  3. Add a new mesh component (nothing happens)

         if:
             MeshComp:= Entity.GetComponent[mesh_component]
         then:
             Entity.SetGlobalTransform(XForm)
             MeshComp.RemoveFromEntity()
             if. Entity.GetComponent[mesh_component] then Print("This shouldn't print")
             NewMeshComp:=Meshes.mTemp_Box{Entity:=Entity}
             Entity.AddComponent(NewMeshComp)
             if. Entity.GetComponent[mesh_component] then Print("It has a mesh again") 
    

Expected Result

The old mesh should disappear and the new mesh should be shown

Observed Result

The old mesh is still showing

Platform(s)

All

The status of FORT-1018118 changed to ‘Needs Triage’. We’ve confirmed the issue and it’s waiting to be assigned to someone to fix it.