The root cause was that the bAllowCPUAccess
property of the StaticMesh
was not set to true
. This property is essential for runtime access to the mesh data, which I overlooked.
The solution was straightforward once the issue was identified. I navigated to the problematic StaticMesh
assets in the Unreal Editor and ensured that their bAllowCPUAccess
flag was set to true
under the mesh properties. This change allowed the CopyMeshFromStaticMesh
function to execute successfully in the packaged game.