Search Unity

Third Party Photon "type is defined multiple times" Errors after Upgrading to 5.

Discussion in 'Multiplayer' started by MarkVatani, Mar 4, 2015.

  1. MarkVatani

    MarkVatani

    Joined:
    Sep 4, 2012
    Posts:
    39
    So far I've got these two errors in my project after upgrading:

    "Assets/Plugins/ChatApi/ChatClient.cs(32,31): error CS0433: The imported type `ExitGames.Client.Photon.IPhotonPeerListener' is defined multiple times" from my ChatClient.cs file: public class ChatClient : IPhotonPeerListener

    "Assets/Plugins/ChatApi/ChatPeer.cs(15,31): error CS0433: The imported type `ExitGames.Client.Photon.PhotonPeer' is defined multiple times" from my ChatPeer.cs file: internal class ChatPeer : PhotonPeer

    These came from the Viking Demo (https://www.assetstore.unity3d.com/en/#!/content/1846) that I modified and now my project won't run. No idea how to fix this. :(
     
  2. Sour

    Sour

    Joined:
    Apr 14, 2013
    Posts:
    24
    I'm having the same issue. I'm using the latest version of uLink, upgraded from a working game and I get the exact same compiler errors.

    It seems whether you "Upgrade obsolete API" or not (which modifies the uLink assembly), it still thinks both IPhotonPeerListener and PhotonPeer are defined multiple times.
     
    Last edited: Mar 4, 2015
  3. vadiml

    vadiml

    Joined:
    Aug 12, 2014
    Posts:
    32
    Hi,

    Did you try import PUN into new empty project from asset store and build some demos?
    If this works, maybe remove PUN from you project and reimport again?
     
  4. MarkVatani

    MarkVatani

    Joined:
    Sep 4, 2012
    Posts:
    39
    Thanks. Yeah, I had to remove it and reimport. It cause a lot of headaches because I had to set a bunch of stuff up again, but I'm back in business.