Hi
i don’t get the option of mirror when i press ctrl+. when renaming mono development
Hi
i don’t get the option of mirror when i press ctrl+. when renaming mono development
Have you installed the Mirror package from the Unity Package Manager and correctly configured your code IDE for Unity?
You can always add the import manually too.
I’ve got a similar problem. The MyNetworkManager code compiles, so Unity can find all the packages, but Visual Studio Code doesn’t correctly reference Mirror as it thinks there are syntax errors in the Mirror code. It’s specifically calling out some classes as missing, e.g. LogFactory and MessageBase, which seem to have been associated with the deprecated HLAPI. Any idea what could be different in my installation that VSCode can’t find these?
Thanks,
Paul
So I “fixed” the problem, but I can’t explain why it works at all. Despite the fact that a project that uses Mirror compiles and runs, the Package Manager didn’t show Mirror as being in the project. I Updated and Imported Mirror again, a number of syntax errors were reported, and the Mirror package still didn’t show up in the Package Manager under the “In Project” filter. However, after doing that Visual Studio stopped complaining about the code, and Unity will still compile the project. This may be related to the differences I mentioned during the original install. Tomorrow I’ll try removing Mirror completely and reinstalling from scratch.
did you drop the script onto the network manager first before changing from mono to network manager, that how it worked for me. i am stuck again further down the line nearly at the end of section 1, it wont allow me to rename the client name as there is no option like in the video. i have done 3 gamedev courses and this one is the only one i have this many problems with. not saying the instructor is at fault but i think unity have changes some things since this was made
No, I just messed around with the Package Manager and that changed something in the VSCode view of the source. Unity is indeed changing things. The underlying networking system that Mirror uses is now deprecated, and slated to be dropped completely by 2022. Unity tried to drop it earlier, but had to extend support due to customer complaints. The result is rather a mess, and Vis2k now has to take over support for a set of APIs that used to be supported by Unity, and the transition isn’t clean. As you say, it’s not the instructors fault, but it does make it more difficult to create course material that works for everyone.
i left it i the end and i have been doing a multiplayer kart course i found on Udemy,
I’m sorry to hear that. For what it’s worth, the issues with VSCode came back, so I deleted the entire project, upgraded to 2020.11.f1, and rebuilt the project from scratch and things are working much better now. Mirror still doesn’t show up as an installed package, so it’s not perfect, but better.
i built in 2020.1 too, took a while to sort out VSCode then it worked, got nearly to the end of section 1 and when i came to rename the client it would not let me as the option was not there like in the video, did it again just in case and tried different ways but still no option to reset the name so it show up in the game. when you hover over the network and right click there was suppose to be an option at the bottom to reset the name, guessing unity has been messing with things again. ill come back to it at some point when i have finished everything else and try again