Based on the ShooterGame sample, I created a new weapon (via Blueprint). It’s a weapon that changes its color (among other things, but irrelevant right now) based on whether it’s hit by sunlight or not.
Skipping the details, the functionality is working, but the change is only visible on the local machine (server or client). I want it to be replicated.
So, I have the following setup… here’s the construction script.
Here’s the event graph (only the relevant part):
I tried setting the property “Replication” to “Replicated” on the variables Material1P and Material3P (I know, only really needed on Material3P), but then the change only happens on the server, and not on the client(s). The Timeline also has “Replicated” checked.
I also tried changing the Mesh1P and Mesh3P declaration:
UPROPERTY(BlueprintReadOnly, Replicated, VisibleDefaultsOnly, Category=Mesh)
TSubobjectPtr Mesh3P;
Didn’t help too. Ideas?