Hello guys, is there any unique id that can be used to reference actors both on local clients and remote ones too? I tried GetUniqueID() but it returns a different ID for each client.
What I’m trying to do is generate the appearance of a complicated actor randomly based on a seed. The seed must be the SAME on EACH client to order to produce the same result.
This seed isn’t unique to each session so restarting sometimes changes nothing, but maybe the host could replicate a universal starting seed for every client at the start of each game. You could also use FApp::GetSessionId(); which changes every new session but not in the editor.
GetUniqueID() is a local ID and cannot be used over the network. You also cannot use the NetGUID of the actor because they are unique for every connection (aka, different for every client).
You have to create your own variable, there is no existing value you can use. I do this frequently. You can ensure the property only replicates when the actor is created by using COND_Initial as the replication condition: