Files
agame_for_unity/Docs/FishNet-Documentation-main/fishnet-building-blocks/components/utilities/defaultscene.md
T
2026-09-20 15:53:11 +08:00

1.8 KiB

description
description
This component can be used to easily load an online scene when network starts and an offline one when it stops.

DefaultScene

Description

This component will automatically change between online and offline scenes depending on server and client connective state. When a connection is started the online scene is loaded, and when disconnected the offline scene is loaded. This component must be placed on or beneath your NetworkManager.

{% hint style="success" %} Check out the API page for specific methods here. {% endhint %}

{% hint style="warning" %} For this component to work, both the online scene and the offline scene must be selected in the inspector, and they must not be the same scene. {% endhint %}

Settings

Default settings

⚙️ Enable Global Scenes

This will load the scenes as global when enabled, or as connection when not. For more information on the differences see Scene Loading.

⚙️ Start In Offline

This will load the server and clients into the offline scene when the game starts.

⚙️ Offline Scene

This is the scene to load when offline.

⚙️ Online Scene

This is the scene to load when online.

⚙️ Replace Scenes

This can be set to replace all loaded scenes, or just online scenes with the Online or Offline scene. For more information see loading Scene Loading - replacing scenes.