I am in my Custom Event which is RunOnServer. It requires an array of StaticMeshes, and for each of those I want to change their Material.
I call another Custom Event which is Multicast with inputs being the Mesh (by ref) and the material and its index.
I expect my Debug Message to say it changed the Material On the Server and on the Client similar to this:
The Material is changed on the Server and the Client for each StaticMesh.
However, in some instances my SetMat event seems like it is not multicast, and only run on the server like this:
You can see here, that my SetMat Multicast event is only run on the Server for some of the loop iterations.
For some other iterations it seems to work as intended.
With yet another input array of StaticMeshes I get a similar result:
Here you can see once again that the code is only run on the Server, and the Client isn’t changing the Material as I would expect it to.
Grass01 and Fern04 are changing their Materials on the Client and the Server as expected, however all the other Components are not. Also the order in which they appear seems strange, as I would expect the Yellow and Green Debug Message (Client/Server) would appear back to back, before going through the other Components (CastleWall etc.)
What am I doing wrong? I have all my StaticMeshes set to replicate (It is one Actor Blueprint, with multiple StaticMeshComponents)
Thanks for reading through this hope you can help me!
Feel free to ask if you need additional info!
As you can see, now all my Meshes are being changed from the Server and then from the Client.
However it still seems off, as I would expect it to have each Material to be Changed on the Server and the Client taking turns like this: (Awesome Paint skills behold!)