Mirror icon indicating copy to clipboard operation
Mirror copied to clipboard

Add per scene Network Manager documentation

Open victorfonsec4 opened this issue 3 years ago • 2 comments

On the Network Manager page in the docs, it states:

"However it is also possible to have a separate Network Manager in each scene with different settings, which may be helpful if you wish to control incremental prefab loading, or different scene transitions."

I'm having some trouble getting this to work, when loading a new scene with a different Network Manager the new one just gets deleted with a warning:

""Multiple NetworkManagers detected in the scene. Only one NetworkManager can exist at a time. The duplicate NetworkManager will be destroyed."

Thanks!

victorfonsec4 avatar Jun 01 '22 08:06 victorfonsec4

Hello victor,

I had the same trouble as you. I finished using only one NetworkManager across all scenes (with the advice of Mirror staff on discord) , with a SceneManager.sceneLoaded callback to handle the non generic code per scene. But sure, documentation should be updated here

Etiennef3D avatar Jun 05 '22 13:06 Etiennef3D

That solutions worked for me, thanks! Will leave it open to get an official answer though.

victorfonsec4 avatar Jun 08 '22 03:06 victorfonsec4

Network Manager is a singleton - there can be only one. I'll edit the doc to remove that sentence.

MrGadget1024 avatar Nov 24 '22 11:11 MrGadget1024