No SceneManager
I've got the following code:
var startGameArgs = new StartGameArgs()
{
GameMode = GameMode.Shared,
SessionName = "default",
};
But it throws the following error:
No SceneManager passed and the default provider component type (Fusion.NetworkSceneManagerDefault, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null) was not found. Fusion will not be able to attach to scene NetworkObjects.
It looks similar to this one, but this one is for a different object and outdated: https://forum.photonengine.com/discussion/19385/no-sceneobjectprovider
Anyone know how to fix it? Nothing on Google
Comments
-
Fixed with
var startGameArgs = new StartGameArgs()
{
GameMode = GameMode.Shared,
SessionName = "default",
SceneManager = gameObject.AddComponent<NetworkSceneManagerDefault>()
};
Not sure if the fact NetworkSceneManagerDefault couldn't be found on its own will cause problems down the line, though.
0 -
Seems to be because I have a custom asmdef. Adding an asmdef to the Asteroids Fusion example causes the same issue.
Assigning a SceneManager manually also seems to cause issues in the Asteroids Fusion example where nothing spawns
0 -
Looks like you can't create the component on a fly with
SceneManager = gameObject.AddComponent<NetworkSceneManagerDefault>()
But if you have it in a prefab first, it works:
SceneManager = _runnerInstance.GetComponent<NetworkSceneManagerDefault>(),
0