Unity opens Visual Studio 2019 but has no photon namespace

Good day.
Ive probably spent at least 3 hours going back and forth, trying different versions of unity, updating Visual Studio 2019, and recreating unity projects and re-importing the PUN 2 - FREE package in unity.
No dice. When I try accessing the namespace photon.pun ...nothing comes up. Doesn't recognize it.
Unity is also giving an error in the console once i import the package:
error: Assertion failed on expression: 'gForceReimports->empty()'
After PUN 2 - FREE is imported, it is also not showing up in my unity Package Manager. Should it be?

Hopefully someone can help me..
Thanks.

Answers

  • Hi @Adaga,

    Thank you for choosing Photon!

    You are probably using 2019.3.12.
    Please change Unity version.
  • Hi @JohnTube
    Thanks for the reply.
    I have tried the latest stable release (at the time it was 2019.4.1f1). I tried 2019.1.0f2, and I've tried the beta 2020.1.0b13.
    None of them pull the Photon namespaces into Visual Studio 2019 when I open a script. I uninstalled and reinstalled Visual Studio 2019. I did a repair on it through the Visual Studio Installer.
    Is the problem Unity, Visual Studio or Photon?
    I really am not sure what else to try at this point. I'm seeing some other forums say to manually add some system dll files to my project reference or something.. I didn't think it would be this complex.

    Thanks!
  • JohnTubeJohnTube mod
    edited July 2020
    Hi @Adaga,

    I'm sorry you are running into this.
    We did not have such issue, did you try re importing PUN2 in a clean fresh new empty project?
    Did you try another IDE?

    Maybe you need to reference PUN (or other Photon assemblies) using asmdef.
  • Hey everyone. Got it FIXED!
    Solution (it was a Unity issue):
    In Unity, goto Edit > Preferences > External Tools > External Script Editor, and point it to Visual Studio..
    Why this was so hard to find, I have no idea. But now my Photon solutions and namespaces properly transfer from Unity to Visual Studio. Hooah!
Sign In or Register to comment.