Hi! I am currently learning how to write multiplayer programs with NGO and Multiplayer tools. The Multiplayer Play Mode runs fine on my home desktop with Unity 2022 LTS, but it failed to run and gave the following compilation error when I run in the office with Unity 6:
All my Installs on NGO(2.1.1), Multiplayer Play Mode(1.3.2), and Unity Transport(2.4.0) have been the latest. I think the problem lays on I do not import or inherit the namespace Multiplayer so I cannot call anything related to Multiplayer. What should I do to enable this? Thanks!
Are you using Assembly Definitions? If so you just need to add the corresponding dependency to it.
No I am not using Assembly Definitions(pretty new to this), and I notice that by removing the PlayMode package the namespace Multiplayer is then available in everywhere. Should I use Assembly Def then if I want to use the PlayMode? Thanks!
Asmdef are mainly clean code best practice, using them is highly recommended regardless of this issue as it enforces who depends on what.
I think your issue may have some other cause. Try creating a new empty project, add the package and then add a script that tries to use MPPM. If this works, it’s something about the current project’s setup.