I also opened Visual Studio in another project and I didn't get the This Unity project was not generated for the Visual Studio Tools for Unity error. Also I didn't see the Pun 2 in the in project section of the package manager. I was scared of Photon stuff breaking if I press the import button so I didn't do it. In the package manager where I downloaded Pun 2 there was still the import button visible even though I think I have all the photon stuff required. From those I have checked embedded packages and local packages. In the external tools menu there were many options for generating. I went to unity preferences > external tools and the external script editor was set to Visual Studio Community 2019 and the other options were open by file extension and browse. This didn't help at all and I still have the same issue. Use Unity to build high-quality 3D and 2D games, deploy them across mobile, desktop, VR/AR, consoles or the Web, and connect with loyal and enthusiastic players and customers. I tried fixing this by updating Photon from the unity package manager and by updating Visual Studio to a newer version (when doing this Visual Studio warned me for using. Unity is the ultimate game development platform.
In your Unity Editor, please go to Preferences > External Tools and select Visual Studio for a better experience.Īt the same time I got many errors because Visual Studio did not recognize the namespace Photon.Pun anymore.
I have been making my multiplayer game using Photon Pun 2 for some time now, but suddenly now when I opened Visual Studio there was a text saying: This Unity project was not generated for the Visual Studio Tools for Unity.