Issues with namespaces and folder structure
I'm having a seemingling elementary issue regarding namespaces that I've been struggling with. I've installed both the CorgiEngine package as well as the PhotonEngine package. Both have their own namespaces (MoreMountains.CorgiEngine and Photon.Pun etc). I've been mostly working in the corgi engine namespace up until now, and now I'm attempting to merge my Photon multiplayer setup with my game.
So, when I'm editing one of my CorgiEngine scripts, and attempting to add Photon functionality through (using Photon;) visual studio isn't recognizing the reference. If I make a script in Assets/Scripts and try to use (using Photon;) it DOES recognize the reference. In my research and troubleshooting this obviously seems like a heirarchy problem. I've seen suggestions to put them in the Asset/Plugins folder, so that they compile earlier, but this didn't work for me.
What am I missing? How do I reference Photon.Pun while working on my MoreMountains.CorgiEngine scripts?
Answer by OhDangTheJam · Apr 22, 2021 at 12:29 AM
Ok, so in the CorgiEngine/Common/Scripts folder, there is a MoreMountains.CorgiEngine.asmdef file. You can add Assembly Definition References in here, I added PhotonRealtime and PhotonUnityNetwork. Now all the MoreMountains scripts have access to Photon.Pun.