A parameterized NetMulticast function in C++ that is also BlueprintCallable seems to only properly pass parameter values to one client while other clients just receive 0 values.
Example:
We have 3 clients connected to a dedicated server.
MyGameStateC is a C++ class with a NetMulticast function called BroadcastByte(uint8 InByte).
BroadcastByte is a UFUNCTION(BlueprintCallable, BlueprintAuthorityOnly, Category = “MyGame”).
MyControllerBP is a PlayerController with a To-Server RPC called BroadcastMyByte.
A player calls this event and BroadcastMyByte successfully receives byte (let’s say 0x3).
Now on server, BroadcastMyByte calls C++ BroadcastByte on a MyGameStateC object.
Client 1 is not a listen server. He’s just only client that happened to receive correct byte.
I stepped through UE4 in debug and it would appear that a BlueprintCallable NetMulticast takes a special route instead of C++ route. This route apparently does not properly package byte to be sent to all clients after it sends it prepares it for first client. Upon discovering this, I simply added another BlueprintCallable C++ function that would call my NetMulticast function, and that fixed issue. All clients then received correct byte. This is a workaround though, and not a solution.
I’ve attempted to recreate this issue, but haven’t been able to reproduce it. Does it still occur in 4.7.5? If so, a small sample project demonstrating issue would be very helpful.
Setting UFUNCTION to BlueprintAuthorityOnly results in it only being broadcasted to server from server, so removing that allows for a more accurate reproduction. issue does still exist. I just tested it. Only 1 client got byte 0x3 and rest got 0x0.
Thanks for extra information, I was able to reproduce this and we’re working on a fix. There is a bug with how we are processing parameters for a native multicast function when it’s called from Blueprints.