AddEntities function spawn mesh with their lowest LOD group

Summary

I imported a mesh to be spawned with scene graph through the AddEntities function but it will always spawn the lowest quality version of the Mesh. Here is the sample code to spawn in the mesh.

spawn_entity_component<public> := class<final_super>(component):

    @editable ParentEntity : ?entity = false

    OnBeginSimulation<override>():void =
        (super:)OnBeginSimulation()
        Print("OnBeginSimulation")

    OnSimulate<override>()<suspends>:void =
        if:
            PE := ParentEntity?
        then:
            PE.AddEntities(array{Prefabs.ImportedMeshPrefab{}})

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Assets

Steps to Reproduce

  1. Import a mesh in the content drawer.
  2. When prompted for FBX import options, set Static Mesh LODGroup to None.
  3. Once imported, open the mesh’s editor and set the number of LODs to 5
  4. Create an entity prefab with a mesh component referencing the imported mesh
  5. Create a class that spawns an entity. (See sample code)
  6. Create an entity prefab and add the spawn entity component.
  7. Reference the same entity with the spawn entity component on the ParentEntity editable.
  8. Put the prefab with the spawn entity component in the world.
  9. Launch session and observed spawned mesh behavior

Expected Result

The spawned mesh should behave with normal LODs depending on how large the mesh is on the player’s screen. (e.g LOD 0 if the player is close to the mesh, LOD 5 if the player is far from the mesh)

Observed Result

The mesh will always spawn with the lowest LOD, in this case, LOD 5.

Platform(s)

Windows