Swapping Out At Runtime

On this page I'll explain how to swap out to a new type at runtime in your character.

Step 1 - Add interface BPI_MeshSync to your character

Navigate to the Class Settings button in your character blueprint

Next we'll add the interface on the panel to the right

Step 2 - Implement the interface event into your character blueprint

The following needs to be implemented in your character blueprint. Remove Meshes is a function inside the MeshSync function library, search for it by right clicking in your graph, if you don't want to exclude any meshes simply plug a Make Array node into it to avoid errors. Plug the Target Actor into it as seen in the screenshot below.

Inside our character blueprint, the owning client or server (whichever has authority) needs to call the function "Server Set New Type"

Below is the example used in the Demo, on pressing 1 we switch between the two example Actor Type's, this will automatically switch and sync the changes from the server to all the players.

Last updated