PUN Error In Latest Unity Beta (2017.1.0b3) - Hashtable ambiguous reference

PUN has been working fine for me until I upgraded to the latest beta version of Unity.

Now I get lots of errors similar to the following:
Assets/Photon Unity Networking/Plugins/PhotonNetwork/LoadbalancingPeer.cs(431,63): error CS0104: `Hashtable' is an ambiguous reference between `System.Collections.Hashtable' and `ExitGames.Client.Photon.Hashtable'

I know I can workaround this by modifying the Photon scripts to specify either to use System.Collections.Hashtable and ExitGames.Client.Photon.Hashtable, but just wanted to pass this information along regarding this problem with the latest unity beta.

Comments

  • I tracked down the problem to line 12 of RoomInfo.cs:



    Since the UNITY precompiler symbol doesn't get defined then the using Hashtable line doesn't get defined.
  • SolidEarthVR
    edited May 2017
    Here's the fix for each of the following:
    • RoomInfo.cs
    • Players.cs
    • Extension.cs
    • LoadBalancingPeer.cs
    • ChatClient.cs
    • ChatPeer.cs
    • ChatChannel.cs

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @SolidEarthVR,

    Thank you for choosing Photon and for sharing the fix with the community!

    The fix is committed already and pending new PUN release.
  • Great, thanks John!
  • Can you guys add 2018 to the list too?
  • Hi @Kobaltic,

    this is planned for the next release.
  • Hi @Christian_Simon,

    When is the next release planned for that includes 2018?
  • Hi @Aidan,

    Unity 2018 should already be supported starting with PUN version 1.89. Current version is 1.90. Please update to the latest version. If you have problem with that version in combination with Unity 2018, please feel free to ask here in a new thread.
  • I'm a little disappointed about how badly Photon updates. I have all these red flags in my project every time there's another update. Pretty much every Photon project I've been working on breaks after a certain amount of months and I have to rebuild the entire thing from scratch because of some error I can't get rid of. Hopefully something better will take it's place someday. This is exhausting to try and figure out every time.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @JGameMaker,

    Do you currently have an issue with the latest version of PUN?
    If it's the case:

    - What is the issue exactly?
    - Is it PUN classic or PUN2?
    - What Unity version are you using?
  • @JohnTube

    This is on Unity2018.1.5f1 with Photon PUN+ Classic. I didn't even know about there being a PUN2 until now but that only adds to my frustrations. I've been working with Photon since 2015 and yeah every update comes with it's own garbage. Here's the latest errors in my console. Unity 2018 wasn't listed in some of the scripts and I added it like it said above but it's still giving me errors. My project won't load fully and I can't get into any of my PlayMakerFSM's or work on my game any further until I get rid of these errors and it's really annoying.


  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @JGameMaker,

    Those files are not part of PUN.
    "Assets/Plugins/PhotonLoadBalancingApi" is part of "Photon Realtime Unity SDK" or "Photon Voice".
    Make sure to clean up files you don't need or use in your project and know which assets are from which package.
    Also, a Version Control System like git is recommended.
    And you don't need to update assets all the time unless you need to.
  • @JohnTube

    Alright thanks for the tips and telling me that those files weren't a part of PUN. I deleted everything Photon Chat and Photon Voice from my project and it's playable again at least :smiley: I think I was trying to add those to my project and it got messed up somewhere.