Parameters of PhotonNetwork.Instantiate

Options
I'm having trouble finding documentation on the PhotonNetwork.Instantiate parameters. The first three are obvious but I'm trying to instantiate an object as the current objects parent and I think the data parameter is the solution but I can't find a way to utilize said parameter. Yes, I've used transform.SetParent but that doesn't get networked to the other clients (which is what I'm trying to do). If there are any other solutions to set a child of an instantiated object over the network, that would be much appreciated as well. Thanks!

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @zblase,

    The fourth parameter is the interest group documented here.
    "Custom Instantiation Data" (5th argument/parameter) was added to the documentation this week.

    Yes, I've used transform.SetParent but that doesn't get networked to the other clients (which is what I'm trying to do). If there are any other solutions to set a child of an instantiated object over the network, that would be much appreciated as well.
    You need to do this (transform.SetParent) on all clients inside OnPhotonInstantiate callback.