Player Components being Disabled by photon

Hi, I have an issue where all my local players components are disabled on the root object.


I parent my player to another photon object (owned by another player e.g a vehicle), when said object is Destroyed my player has all of its components disabled on the root object and i cant figure out why this is. we are using Photon V1 as well. I tested doing this (Enter Vehicle, player parents to photon spawned object owned by another player) then i manually removed player from the Hirarchy parent, on account B i disconnected and player was fine so its fairly safe to assume its coming from this.

player A is parented to player B vehicle, player b disconnects and their vehicle is destroyed, player A is un parented from player B vehicle and player B vehicle is cleaned up.

Best Answer

Answers

  • emotitron
    emotitron ✭✭✭

    Nesting isn't officially supported for reasons like that. However in the latest Pun2 2.19 I did fix much of what was making nesting problematic. It now automatically will detach any nested children when destroying objects on disconnect. This happens before the destroy, which prevents unity from disabling components like that.

  • emotitron wrote: »
    Nesting isn't officially supported for reasons like that. However in the latest Pun2 2.19 I did fix much of what was making nesting problematic. It now automatically will detach any nested children when destroying objects on disconnect. This happens before the destroy, which prevents unity from disabling components like that.

    is this doable in pun v1?