Hello,
I am currently experiencing an issue with the CopyMeshFromStaticMesh
function from the UGeometryScriptLibrary_StaticMeshFunctions
class in a packaged Unreal Engine game. While the function operates as expected within the UE Editor, it fails when called in the packaged game environment.
Description of the Problem:
- Environment: The issue arises in the packaged version of the game; however, everything works correctly in the Unreal Editor.
- Function Behavior: When invoking
CopyMeshFromStaticMesh
, it returns aFailure
outcome for certain static mesh assets, despite those assets being properly loaded and visible in the game play. Interestingly, this issue is inconsistent, as the function succeeds for some meshes but fails for others under similar conditions. - Failure Condition: According to the function’s implementation, a
Failure
outcome is primarily returned if either the source static mesh (FromStaticMeshAsset
) or the target dynamic mesh (ToDynamicMesh
) isnullptr
. However, all involved assets appear to be correctly referenced and loaded, as evidenced by their visibility in gameplay. - Specific Observation: The problem seems to be selective, affecting only certain static meshes. This has led to considerable confusion since the meshes that fail do not exhibit any obvious differences from those that succeed in terms of asset settings or properties.
Steps Taken:
- I have verified the presence and loading of all static meshes in the packaged game, ensuring that they are not
nullptr
. - I’ve reviewed the packaging settings to confirm that all necessary assets are included in the build.
- Debugging efforts have been focused on understanding the difference in asset handling between the editor and the packaged game environment, but no clear cause has been identified yet.
I am reaching out to the community for insights into what might be causing this selective failure of the CopyMeshFromStaticMesh
function in a packaged game. Any advice on additional debugging steps or known issues with asset packaging that could lead to this behavior would be greatly appreciated.
Thank you in advance for your assistance.