Photonview on child object of player with photonview

Options
I have a player GameObject in my game with a photonview attached and it is observing the transform and the rigidbody.

A child object of the player GO has a particle emitter that can turn on and off. I would like to synchronize the particle emitter's state.

How do I best accomplish this?

Thank you.

Comments

  • Nori_SC
    Options
    public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
    {
    if (stream.IsWriting)
    {
    stream.SendNext(On);
    }
    else if(stream.IsReading)
    {
    On = (bool)stream.ReceiveNext();
    }
    }
  • Nori_SC, I extremely appreciate the amount of support you have given this person. I’m sure you’ve easily answered their and my question with your beautiful example.

    If you’re gonna post something, maybe give people some actual explanation.