How can I save the Static Mesh property of an FGBuildable component?

Hi, I'm making a buildable for Factory Props that allows the player to customize a character model, and you can select which helmet mesh to use from a UI. This triggers a "Set Static Mesh" node on the StaticMesh component of the building. The problem is that the selected mesh does not save, and is set to the default one after a reload. I've read through the save system documentation, but I'm not sure how to add a SaveGame flag, though I did override the ShouldSave function as instructed.
No description
Solution:
Alternate method: Linear motion does this by putting the selectable meshes into a map and saving the selected string.
No description
No description
No description
No description
Jump to solution
2 Replies
Mircea
Mircea2mo ago
While I think adding SaveGame to a property at runtime is possible, I don't think it's safe You can add a component to the playerstate using SCS hooks and store the mesh to use there as a savegame property, then apply it on load
Solution
D4rk
D4rk2mo ago
Alternate method: Linear motion does this by putting the selectable meshes into a map and saving the selected string.
No description
No description
No description
No description
Want results from more Discord servers?
Add your server