RPC vs RaiseEvent vs PhotonView

Options
Hey,

I am trying to figure out which method is best to implement for my case.

My game has 2 players, both have a unit they control. Each player also will spawn periodically units that fight enemy's units. The number of units can vary from 2 to 100 in some rare cases.

I have implemented PhotonView for keeping track and synchronizing the units rotation and position as they are constantly moving or attacking.

What would be the best case for less performance pressure and in general a better way of coding?

Thanks

Comments

  • Kurtav
    Kurtav ✭✭
    edited May 2017
    Options
    RPC is a function of the object. It is attached to the object. It calls from the photonView . For example, we call behavior from an object.

    RaiseEvent - a function that is not tied to any object (photonview owners). It is not called from photonView . For example, we call the behavior of a room.