[Closed] When is the Actor Role safe to use
I'm trying to find a good place to test the role of an actor in C++ as early as possible on a client. Basically I want to know if it is Role_SimulatedProxy or Role_AutonomousProxy. It appears that after PostInitializeComponents or BeginPlay, the role is still undefined. Only after the first tick i can get the correct value. Is there any other function before tick I could use?
Edit: It appears that the Role might not be reliable on the first tick neither. Should we have ReplicatingUsing on Role member variable in Actor class so we can have a callback the first time the Role is set?
Thanks in advance.
The question has been closed Jun 05 '15 at 04:01 PM by Ben Halliday for the following reason:
The question is answered, right answer was accepted
On the client, you should be able to safely use this after the first PostNetReceive call.
answered Jun 05 '15 at 04:00 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here