How to network instantiate LoadLevelAdditiveAsync-Objects

Options
Hi,

I'm loading my player gameObjects with LoadLevelAdditiveAsync. Now I try to network instantiate them with PUN, but I have no idea how to do this.

Do I have to use LoadLevelAdditiveAsync on both machines for the same asset and then I assign the ViewID with PhotonNetwork.AllocateViewID()?

I'm not sure what the best practice is here.

Thanks

Comments

  • Tobias
    Options
    If you want to instantiate the same thing, you need to load it on all devices that should instantiate the object, yes.
    PUN can't manage which assets you loaded, so you will have to manually assign ViewIDs to the PhotonViews (added at runtime or on the Prefab).
    Use PhotonNetwork.AllocateViewID() to get one, then send an RPC to load, instantiate and apply the ViewID.

    There is a brief overview for this in the reference:
    http://doc-api.exitgames.com/en/pun/cur ... iateManual