Class PhotonPeer. Can't connect.

Options
SnosMe
edited September 2014 in Photon Server
I'm developing my own server, But can't connect to it from Unity, I am sure that the problem in client side script. It's says me "Connecting" and nothing changed.
using UnityEngine;
using System.Collections;
using ExitGames.Client.Photon;
 
public class Con1 : MonoBehaviour, IPhotonPeerListener
{
    public PhotonPeer photonPeer;
 
    void Start()
    {
        photonPeer = new PhotonPeer(this, ConnectionProtocol.Udp);
        photonPeer.Connect("localhost:5055", "SNOSGamesMmo");
    }
 
    void OnApplicationQuit()
    {
        photonPeer.Disconnect();
    }
 
    void Update()
    {
        Debug.Log(photonPeer.PeerState.ToString());
    }
 
    public void DebugReturn(DebugLevel level, string message) { }
    public void OnEvent(EventData eventData) { }
    public void OnOperationResponse(OperationResponse operationResponse) { }
    public void OnStatusChanged(StatusCode statusCode) { }
}

Comments

  • chvetsov
    Options
    It looks like you do not call Service method. you should call it regularly in order to handle incomming and outgoing messages
  • SnosMe
    edited September 2014
    Options
    chvetsov wrote:
    It looks like you do not call Service method. you should call it regularly in order to handle incomming and outgoing messages
    Ilya can you give me link for documentation for this method, or example of code.
  • chvetsov
    Options
    it is turned out that you do not have to call Service if you use PUN. it is done automaticly
  • I understand. Now I have another question, how often to call the Service(), after all Update() is not the best place for it
  • chvetsov
    Options
    You should not call it at all, because it is done by framework (by PUN)