Hey guys,
I’ve been following along Brackeys multiplayer FPS tutorial as listed here, Making a Multiplayer FPS in Unity (E19. Joining 1/2) - uNet Tutorial - YouTube
I’m copying it exactly as he writes it, but whenever I try to make NetworkManager a singleton, like he does i get an error…
Assets/Scripts/Networking/Lobby/JoinGame.cs(26,41): error CS0117: NetworkManager' does not contain a definition for
singleton’
I cannot understand why?
Because it’s not a singleton like he does it, the rest of my NetworkManager calls don’t work?
On the left is my un-working code, whilst on the right is his working code. All my issues seem to come from the NetworkManager…
Example of NetworkManager call error…
Assets/Scripts/Networking/Lobby/JoinGame.cs(27,28): error CS1061: Type NetworkManager' does not contain a definition for
matchMaker’ and no extension method matchMaker' of type
NetworkManager’ could be found. Are you missing an assembly reference?
His tutorial is made in an older version of Unity, but I have gone through the documentation and upgraded all the API changes.
I’ve also tried making it a static variable but that also doesn’t seem to work? (as i understand that’s kind of what a singleton does?)
Anyone know what I can do to fix this issue?
Thanks in advance