示例#1
0
    // Use this for initialization
    void Start()
    {
        GameObject go = Instantiate(UiPrefab) as GameObject;

        instance = go.GetComponent <PlayerPunChatUI>();
        instance.SetTarget(this);

        UserId    = this.photonView.owner.UserId;
        channelId = PhotonNetwork.room.Name;

        PunChatClientBroker.Register((IPunChatChannel)this);
    }
 void Awake()
 {
     Instance   = this;
     ChatClient = new ChatClient(this);
 }
 void Start()
 {
     PunChatClientBroker.Register(this);
     IsConnected = false;
 }