- Home /
When the spawned object is ready to send RPC?
Hello mates,
I'm having problem to identify when I can safely send a RPC in a recently spawned object. I tried to put in OnStartClient and OnStartServer but nothing happens, which is worse because I can't identify that RPC wasn't sent.
I manage to isolate the problem in a simple project. I know, in the example used in this project, it can be solved using SyncVar, but in my main project is a lot of others vars to set as it spawns in client.
I put my bypass approach as a checkbox in Spawner object. Its enable an invoke which last 0.1 seconds to finally call the RPC. This Delay makes it works fine in this project and in my main project, but it is kind of non-reliable I think.
How to use the example project: Compile; Execute 2 instances; Create a "local game" with both connected; Use space in the server to spawn the object.
After compare with the bypass activated/deactivated.
I hope someone help me with it because the API and Google couldn't.
I want to know this too, I put a waitforseconds before calling the RPC I need but that's not right at all.
Your answer
Follow this Question
Related Questions
Animation over network using rpcs 0 Answers
UNET Rpc calls wrong inherited script 2 Answers
HLAPI RPC synchronization - how to wait for a RPC 2 Answers
How to use Unet to send network messages like RPC (Javascript) 0 Answers
Changing variable value Network 1 Answer