How does lyra assign the mesh for the character?

I see the code in lyracharacter.cpp that calls the mesh:

USkeletalMeshComponent* MeshComp = GetMesh();

But its not obvious which mesh is being chosen. I know lyra chooses between two meshes randomly, so thats probably part of this.

getmesh() is just:

FORCEINLINE class USkeletalMeshComponent* GetMesh() const { return Mesh; }

Isn’t the mesh already assigned by this point? How does lyra decide which mesh to assign and where is it held?

edit: okay I see that there is a blueprint under cosmetics thats selecting the character. From what I understand, using a blueprint to select characters is preferred for stability?

See the B_PickRandomCharacter BP for where the mesh gets assigned.

Also see my attempt to document the ShooterMannequin character in Lyra 5.1 here for more info:

And finally, we have an unofficial Lyra Dev discord if you’d like to join us:

1 Like