NGO Play Mode scenario doesn't enter Play Mode

Hello all,

I’m building a multiplayer prototype, but I’m facing some weird issues with Multiplayer Play Mode.

I made the basic multiplayer stuff (2 player co-op) in Project A, had it up and running there. The Play Mode worked just fine, the boot scene loaded normally and game ran perfectly in two simultaneous instances and I was able to verify the multiplayer worked.

After that I moved most of the multiplayer stuff to Project B, where everything seems to work otherwise (I have online and local co-op, so the local co-op works just like in Project A). The problem appears when I want to try the online functionality (that worked in the Project A). I set up Play Mode Scenarios just like in Project A; Player 1 and Player 2 tags, add second instance in the settings and add the scene to load. The second instance window of Player 2 opens, the scene loads but the Player 2 window never enters Play Mode. If I open the stats popup, it says “- FPS (Playmode off)”.

I’ve been trying to figure this out for several hours now and can’t figure out why it works in one project and not the other. I guess there might be a setting somewhere in the editor that is different, but to figure out which…

Thanks in advance for any and all answers!

Unity 6000.2.14f1
NGO 2.7.0
Multiplayer Play Mode 1.6.2

Try deleting the /Library/VP subfolders, or the entire Library to rule out any issues with stale artifacts.

As to „moving stuff“ it matters how you do that, and what you moved. Did you export the files as .unitypackage and import it in the other project? Everything else is potentially problematic.
Did you also copy contents of the ProjectSettings folder?

I’ve removed Library multiple times, doesn’t make any difference.

I copied scripts and related prefabs by hand, or in some cases just copied lines of code. I didn’t want to do unity package export, because the destination project already had a lot stuff in it.

I did not copy ProjectSettings because of this same reason. The destination project wasn’t empty.

That doesn’t matter. The .unitypackage export/import guarantees that all referenced assets are included. You get to have the final say in what gets exported and imported nevertheless.

Both projects use the same editor and package versions?

I’d probably try to get MPPM working in that project with a new scene and minimal NGO setup just to see if MPPM is somehow generally broken in that project. If not, it must be caused by the setup. In that case check if there’s any Console messages that might indicate issues. Check both main editor and the virtual player.

Another course of action would be to radically export everything in the current project into a .unitypackage, then import that into a new project. Besides project settings this should continue to work as usual and can sometimes fix odd issues (likely due to ProjectSettings assets). If you feel comfortable with it you could also manually modify ProjectSettings assets, ie deleting the MPPM asset specifically (I can’t recall what its name was).

And source control everything if you haven’t. You want to know when files change, and what exactly changed within them.

I’ve tried eariler with a scene with zero NGO related stuff (just the basic URP scene with a golden ball). Same thing; nothing in the console, scene loads, but virtual player doesn’t go in to play mode.

Sounds like that project’s MPPM is somehow broken.

Personally I would uninstall the MPPM package, remove its ProjectSettings asset and the Library/VP folder (after closing project), then reinstall the MPPM package to see if that fixes it.

If you use the old MPPM window instead of scenarios, can you start an instance successfully? Also could you define UNITY_MP_TOOLS_DEV and UNITY_MP_TOOLS_DEV_LOGMESSAGES in your project and post the logs from both the main editor and the clone?

Alright, I found the culprit. I have an Editor script that runs whenver game starts (or a build is made) that I use to initialize scriptable objects data when game loads. It has these two lines of code

DirectoryInfo dirInfo = new DirectoryInfo(fullPath);
FileInfo[] files = dirInfo.GetFiles();

It’s the dirInfo.GetFiles() that is causing the MPPM to not play.

Oh and to answer simon-lemay-unity; if I activated the virtual player manually or used a scenario where it opens automatically, the end result was the same. The window opens and the scene is loaded in it, but the VP never went to play mode.

Thanks everyone for the help, this one was a bit weird, but got sorted after all.

Interesting. Did this log anything to the Console?

In any case, as a rule of thumb: all I/O operations must be enclosed in try/catch because there’s always a chance for any of them to fail.

Nope, no errors. I thought at first, that it might’ve been because if it didn’t find a folder, but that didn’t do any changes. Anyway, I might investigate it later, but for now I’m just gonna make the process manual for Editor, and only leave the automated for Builds.