Photon SDK in Visual Studio

I’m using the Photon Unity SDK in Visual Studio, and it annoys me that I get a lot of Photon SDK errors when compiling in VS. I understand that the VS compiler isn’t used for the Unity build, as it uses Mono instead, but I typically use the VS compiler for a quick sanity check before switching back to Unity.

The obvious thing I tried was to add the Photon3Unity3D.dll as a reference to the Unity vcproj, but it apparently is already included in the References.

Perhaps it’s another dll that I’m missing?

As an example, it’s complaining that it can’t find the reference to ExitGames.Client.Photon.HashTable.

Has anyone else had this problem? If so, how did you solve it? Or did you?

Er, answering this myself for others… Apparently, the SDK “plugins” folder contains 2 Photon3Unity3D.dll instances. One directly in “plugins”, and another in “plugins/wsa”. For whatever reason, my project defaulted to referencing the wsa version, which I found out is “Windows Store App”, which my game is not (who would???). I fixed the reference by deleted the “wsa” folder and contents, and the correct dll is referenced. Everything compiling fine now.

1 Like
  1. Create new Unity project (which is from Unity 2019.3.12f1).
  2. Import PUN2

VisualStudio2019 cannot recognize Photon namespace…
I uninstalled both Unity and VisualStudio, but the problem still exists.

There is a problem in 2019.3.12 which causes this issue.

Btw: This thread is not related to the current issues.