Scene IDs Update
First, your scenes must be referenced in a ScriptableObject. Open the
Wonderland/Net/Scenes window and click on the Update button.
The auto update works only on this window opening. The rest of this interface is currently not used
The ScriptableObject path is
Create a GameObject with a
NetScene component. This is the base to make a scene joinable online.
SceneIdis automatically assigned (using the scene list).
Refresh UIDsbutton forces the refresh of all NetworkedObjects.
Version. You can join an instantiated scene only if you have the same version.
AutoJoin. Auto joins online on scene load.
If AutoJoin is not enabled, use Join method to go online.
bool success = await GetComponent<NetScene>().Join();
If you do not want Join an existing instance, you can force an instance creation.
SceneInstance instance = GetComponent<NetScene>().CreateNewInstance();
Join a specific instance
If the scene has many instances on the server you can join one with its ID.
var instance = NetManager.MakeSceneInstance(networkId); // networkId may be shared via network or other... bool success = await GetComponent<NetScene>().Join(instance);
Scene id is not checked
This method is called automatically OnDestroy but you can force leave manually with it.