# Variables

## Overview

Fusion module has built-in components to synchronize Local or Global Name Variabes and Lists.

{% hint style="info" %}
They all require to exist in a scene with a **Network Object** in order to work.
{% endhint %}

{% hint style="success" %}
These components, besides synchronizing their current state to remote players, will replicate the state to newly joined players.
{% endhint %}

## Local Name Variables

To synchronize Local Name Variables simply attach a Local Name Variables Netwok component.

<figure><img src="https://3895715781-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDchaEIEhpBAh2gCe06%2Fuploads%2Fgit-blob-9c84e6090308c320425d87906cac7993e465c010%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

## Global Name Variables

To synchronize Global Name Variables create a new game object, attach a **`Global Name Variables Netwok`** then select the Global Name Variables you need

<figure><img src="https://3895715781-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDchaEIEhpBAh2gCe06%2Fuploads%2Fgit-blob-975928e7d32439870908c026484a597550b6116a%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

## Local List Variables

To synchronize Local List Variables simply attach a Local List Variables Netwok component and select **Sync Mode** to **Sync Data**

<figure><img src="https://3895715781-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDchaEIEhpBAh2gCe06%2Fuploads%2Fgit-blob-6cac5071bcaa0528f2a89d549e531e9e1a3ff1fc%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

## Global List Variables

To synchronize Global List Variables create a new game object, attach a **`Global List Variables Netwok`** then select the Global List Variables you need and select **Sync Mode** to **Sync Data**

<figure><img src="https://3895715781-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDchaEIEhpBAh2gCe06%2Fuploads%2Fgit-blob-a177bb37950878298e2eff836099212335a3a227%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

## List Sync Modes

List Network components has 4 different types of synchronization modes:

### **Sync Data**

This mode will sync state of list data

### **Players List**

This mode will populate the list with all players and update it as they join or leave.

### **Attachments**

This mode is meant to be used to register attachment props through the network, once props are registered you can freely use Attach or Remove Prop instructions and it wil automatically replicate the attachments.

{% hint style="success" %}
You can read more about this [**here**](https://docs.ninjutsugames.com/game-creator-2/characters#attachments).
{% endhint %}

### Models

This mode is meant to be used to register models or skins through the network, once props are registered you can freely use Change Model instructions and it wil automatically replicate it.

{% hint style="success" %}
You can read more about this [**here**](https://docs.ninjutsugames.com/game-creator-2/characters#models).
{% endhint %}
