> For the complete documentation index, see [llms.txt](https://docs.engagevr.io/developer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.engagevr.io/developer/creating-locations/network-states/example-network-state-configurations/network-state-toggle-skybox.md).

# Network state toggle skybox

You can use a network state to change the skybox in a Session. Each Toggle Skybox script can load a single skybox material, and then toggle that skybox on and off.

<figure><img src="https://2640392766-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5yxYHsXtlAaoMUrDWhLm%2Fuploads%2Fgit-blob-8177f0ba1f08a5640dbc81f11a3d4a41f8386494%2Fnetwork_state_skybox_overview.png?alt=media" alt="" width="321"><figcaption><p>Component overview</p></figcaption></figure>

The `Network State Trigger_Toggle Skybox` component has a single parameter for the skybox material that you want to load. For information about how to create a skybox material, refer to [Using skyboxes](https://docs.unity3d.com/2021.3/Documentation/Manual/skyboxes-using.html) in the Unity documentation.

<figure><img src="https://2640392766-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5yxYHsXtlAaoMUrDWhLm%2Fuploads%2Fgit-blob-8cbfbdc0bad58a4ededb2b595e905994b09bb491%2Fnetwork_state_skybox_slot.png?alt=media" alt=""><figcaption><p><code>Network State Trigger_Toggle Skybox</code> component</p></figcaption></figure>

The following diagram shows an example of how to arrange the components in Unity, and the required references.

<figure><img src="https://2640392766-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5yxYHsXtlAaoMUrDWhLm%2Fuploads%2Fgit-blob-0c1dd75c17c95b9cef4beeff681673e150e40e9f%2Fnetwork_state_skybox.png?alt=media" alt=""><figcaption><p>Example use of network states to synchronize toggling a skybox change</p></figcaption></figure>
