Exemplo n.º 1
0
    /// <summary>
    /// Called on the server when approving a new player to join the game
    /// </summary>
    /// <param name='approval'>
    /// Approval.
    /// </param>
    void uLink_OnPlayerApproval(uLink.NetworkPlayerApproval approval)
    {
        // Unlike Photon or Unity, it seems that object instantiations are
        // not blocked during level loads for newly connecting clients. That
        // means the server can spawn themselves in the middle of the initial
        // level load.

        // To avoid this, we have to include the level and its prefix in the
        // approval packet.
        approval.Approve(Application.loadedLevelName, NetworkLevelLoader.LevelPrefix);
    }
Exemplo n.º 2
0
 void uLink_OnPlayerApproval(uLink.NetworkPlayerApproval approval)
 {
     approval.Approve(level);
 }