I am thinking how to create a minimap for a multiplayer game. While some actors that should be shown on minimap may be not relevant as they are too far away from the player pawn, I still need to display them.
What will happen if in always relevant GameState I’ll place a pointer to an actor on server (into replicated TArray), but on the client side that actor is not relevant due to distance (and therefore it doesn’t exist on client)? Will it:
Automatically make that actor relevant since there is a pointer to it in an always relevant GameState
You can if the Actor or Component is set to replicate.
No. Having a pointer to a replicated Actor doesn’t affect relevancy.
Depends. If “Net Load on Client” = False then yes then the pointer is invalid while the Actor is not relevant (because the object doesn’t exist on the client) but becomes valid again when it is relevant again (the object is respawned).
If “Net Load on Client” = true then the pointer continue to be valid while the object is not relevant, but the object can’t receive any replicating updates while not relevant but normal events and functions will still work.
Net Load on Client is for actors already existing on the map, so actors that are spawned in runtime on server, but not relevant to client, though referenced in replicated gamestate array, will just be invalid on the client, I guess.