Instantiate without "Resources" folder

Options
The docs say this: "Instead of using prefabs in the Resources folder, you can manually Instantiate and assign PhotonViews. See doc."

What doc are we supposed to see?

I need to instantiate a set of prefabs that aren't from Resources and manually setup the PhotonViews myself. How do I do that?

Thanks!

Comments

  • Tobias
    Options
    In that case, you have to manually instantiate the object and give it some ID for the networking.
    In best case it already has a PhotonView assigned. The new object needs an ID for the network, so the player who creates the new object should immediately call PhotonView.AllocateViewID() and assign this as photonView.viewID.
    To tell the others what you instantiated and whats the ID, you will have to use an RPC. You can send such an RPC through some networked object that you load with the scene.

    Some more detail about this:
    http://doc-api.exitgames.com/en/pun/cur ... iateManual