converting PUN v1 to v2 help needed

Options
Heya everyone,
I'm almost done converting PUN v1 to v2, I just need a little help.
Can you correct the assumptions below and fill in the blanks?
PhotonNetwork.AllocateSceneViewIDs(1)[0]    ->      PhotonNetwork.AllocateViewIDs(true)
photonView.observed = this         ->               photonView.ObservedComponents.Add(this)
Player.name                                         player.NickName
PhotonNetwork.unreliableCommandsLimit                     ???
PhotonNetwork.Connect()                            PhotonNetwork.ConnectUsingSettings
networkingPeer.SendOutgoingCommands()                     ???
PhotonPlayer.Find()                                       ???
PhotonHandler.LastErrorMessage                             ???
NetworkingPeer.ClearErrorCount()                           ???
PhotonNetwork.networkingPeer.DebugPhotonViews()           ???
connect to the Photon cloud in a specific region          ???
SendOutgoingCommands is used after each RPC kind (for example rpc all turrets, stats, what's deployed on the map) to send the state of the world to new players.

thanks!

Comments

  • elefantopia
    Options
    example of one of these RPC kind
    [PunRPC]
    public void RPCScatterSeed(Vector3 pos, Vector3 force, int viewID)
    {
    	PhotonView view = PhotonView.Find(viewID);
    	if (view && view.gameObject.activeInHierarchy) return;
    	GameObject ob = RecycleManager.instance.InstantiateGameObject(ObjectManager.instance.seedObject.gameObject, pos, Quaternion.identity, viewID) as GameObject;
    	ob.GetComponent<Rigidbody>().isKinematic = false;
    	ob.GetComponent<Rigidbody>().useGravity = true;
    	ob.GetComponent<Rigidbody>().AddForce(40 * force);
    }