Destroying child objects

Options
I spawn an object with 4 child objects by PhotonNetwork.Instantiate 'ing the parent one. Then i try to delete some of the child objects. It deletes them just fine on master client, but on the other client it successfuly deletes the parent, and then tries to do it more times if i try to delete more than 1 child. I checked, child objects have different ViewID from parent, but same InstantiateId. From that i'm guessing that it tries to destroy them with their InstantiateId. I suppose i have to change something in photon code for it to work, but i cant find what.
btw im new to photon, so please tell me if im overcomplicating things.

Comments

  • DemelenGopnik
    edited December 2020
    Options
    Okay, i changed view.InstantiationId = parameters.viewIDs[0]; in NetworkInstantiate method to view.InstantiationId = parameters.viewIDs[ i ]; and it worked, but im pretty sure i'm not supposed to do that.