Synchronized Instantiate

Options
I'm making a lock-step MOBA so I need objects to be instantiated on fixed frames. To my understanding, PhotonNetwork.Instantiate sends an RPC that instantiates as soon as the other player gets it, making it differ from client to client. How can I instantiate an object on all clients AND the server as if I were using PhotonNetwork.Instantiate under the lockstep model where there is a predesignated frame to execute the instantiation?

In other words, how do I replicate PhotonNetwork.Instantiate locally on all clients? Can I use Unity's Instantiate then modify variables in the Photon View?

Comments

  • SnpM
    Options
    My current idea is to do a PhotonNetwork.Instantiate but set the object to inactive immediately. Then the object is called awake again the same way I'd do a command in lock-step.
  • SnpM
    Options
    Easy solve: Don't use PhotonNetwork.Instantiate. In fact, don't use photonViews. For the lockstep model, everything will be controlled locally and clients communicate to each other through only 1 networked object (the game manager).
  • Tobias
    Options
    Sorry for letting you figure out everything by yourself. I was sick.
    PhotonNetwork.RaiseEvent() is a good way to send messages independent from PhotonViews, etc. You can make up EventCodes and per code have a specific content, etc.
  • SnpM
    Options
    Thank you! By the way, I read a lot of other helps and suggestions you posted on the internet and you've been a great help to my progress.
  • Tobias
    Options
    That's cool! Great to know some of that helps :)