photonView component on child of object that already has photonView

Options
Hello!

I have a Character gameObject that has the photonView to syncronize it's state.

I have items of character, such as swords, guns, magic spells etcetera. They all are gameObjects that are parented to character's skeleton, so they are all children and grand children of Character gameObject.

Each of this items can have their own behavior and it needs to be synchronized across the network as well.

So I'd want each of these items to have their own photonView.

For a simple case, I have Character gameObject with photon view and Sword gameObject with photonView, and Sword gameObject is a child of Character gameObject.

Would it cause any trouble?

for example, I call PhotonNetwork.Destroy(Character) will the Sword be destroyed properly?

Thank you!

Comments

  • AndreyK
    Options
    AndreyK wrote: »
    For a simple case, I have Character gameObject with photon view and Sword gameObject with photonView, and Sword gameObject is a child of Character gameObject.

    I call PhotonNetwork.Destroy(Character) will the Sword be destroyed properly?

    The short answer is no. The sword will not be destroyed properly.