新增FishNet文档

This commit is contained in:
2026-09-20 15:53:11 +08:00
parent c403145db9
commit 179c282405
431 changed files with 15476 additions and 0 deletions
@@ -0,0 +1,11 @@
---
description: >-
Components are included scripts which you may attach to your objects for
additional functionality.
---
# Components
Many components aim to make development easier, and quicker. For example, if you wish to synchronize animations, you attach the NetworkAnimator component. There are a wide variety of components to choose from.
Pages within this section summarize what each component accomplishes as well provides more in-depth knowledge to the component's settings. A few select components which offer a significant amount of functionality are covered in the [Guides](https://fish-networking.gitbook.io/docs/guides/high-level-overview).
@@ -0,0 +1,31 @@
---
description: >-
ColliderRollback allows an object's colliders to be rolled back for lag
compensation.
---
# ColliderRollback (Pro Feature)
## Description
This component is used for rolling back colliders on objects for the purpose of lag compensation. You can find out more about it in the dedicated guide for this feature: [raycast.md](../../guides/features/lag-compensation/raycast.md "mention")
## Settings
<div align="left"><figure><img src="../../.gitbook/assets/collider-rollback-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Bounding Box**
> This configures how a bounding box is added to the object. When set to **Disabled** a bounding box will not be added. Additional settings are displayed when not set to **Disabled**.
### :gear: **Physics Type**
> This is which type of physics you plan on rolling back, and determines if a Physics collider is added, or Physics2D collider.
### :gear: **Bounding Box Size**
> This determines how large of a bounding box to add. Typically a value three times larger than the world space of your object is sufficient. For example, if your object is a Vector3.one cube, this value would Vector3(3f, 3f, 3f). If an object is exceptionally fast moving consider making this larger.
### :gear: **Collider Parents**
> These are transforms you wish to send back in time when performing a rollback. For best results put your hitboxes on their own transform, which is a child of the object the hitbox is for. A setup example is rovided as a demo within `FishNet\Demos\ColliderRollback`.
@@ -0,0 +1,9 @@
---
description: >-
Manager components are generally only added once per NetworkManager and play a
vital role on configuring your project.
---
# Managers
The [NetworkManager](network-manager.md) will automatically add the needed manager components to itself at run-time, if they aren't already added. You can add them yourself to customize their settings in the editor.&#x20;
@@ -0,0 +1,33 @@
---
description: The ClientManager provides settings unique to clients.
---
# ClientManager
## Description <a href="#server-and-host" id="server-and-host"></a>
The **ClientManager** is FishNet's primary orchestrator for client-side networking, managing connections, state, event handling, and all data flow between the local client and the server.
It maintains a reference to the network connection of the local client, `Connection`, keeps track of all known networked objects on the client through `ClientObjects`, as well as optionally tracks all currently connected clients (when [server ID sharing](server-manager.md#share-ids) is enabled), using a dictionary of client connections. The ClientManager also has many useful events, such as when a client is authenticated and when the local client or a remote client changes their network state. It also is used for sending [broadcasts](../../../guides/features/network-communication/broadcasts.md) to the server.
When enabled, this component will also timeout the client from the server if the server doesn't respond after a set time.
{% hint style="success" %}
Check out its API page for more specific methods and events [here](https://fish-networking.com/FishNet/api/api/FishNet.Managing.Client.ClientManager.html).
{% endhint %}
## Settings <a href="#server-and-host" id="server-and-host"></a>
<div align="left" data-full-width="false"><figure><img src="../../../.gitbook/assets/client-manager-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Remote Server Timeout**
> This decides if the client should disconnect when the server seems unresponsive. This feature can be set to **disabled**, work in **development** and releases, or only **releases**.
>
> * **Timeout** is how long the server must be unresponsive before they are kicked.
### :gear: **Change Frame Rate**
> While enabled, this will change the frame rate limitation when acting as client only.
>
> * **Frame Rate** is the frame rate to use while only the client is active. There is also a setting for client frame rate on the [ServerManager](server-manager.md). When both client and server are active the higher of the two frame rates will be used.
@@ -0,0 +1,47 @@
---
description: >-
The DebugManager helps you debug various networking functions when in the
Unity Editor or Development builds.
---
# DebugManager
## Description <a href="#server-and-host" id="server-and-host"></a>
The **Debug Manager** component can be used to gain extra information and temporarily tweak certain networking aspects to assist in debugging errors in your game. For example, if you are running into Scene ID errors you can enable the Detailed Writing of Scene Objects to know the object names instead of just IDs. These settings often come at the cost of a little more bandwidth used and are only enabled in the Editor and Development builds of your game.
{% hint style="warning" %}
Note that having a DebugManager with some of its settings enabled can cause issues when connecting non-development builds to development ones (including the editor).
{% endhint %}
## Settings <a href="#server-and-host" id="server-and-host"></a>
<div align="left"><figure><img src="../../../.gitbook/assets/debug-manager-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Scene Objects**
> This adds information about scene objects instead of just sending IDs. You can use this when debugging missing sceneId / spawn-related issues.
### :gear: **RPC Lengths**
> This will validate written versus read length of RPCs when enabled. Use in development to detect serialization mismatches in RPCs (written length vs read length).
### :gear: **ObserversRpcs**
> This disables ObserverRpc links.
### :gear: **TargetRpcs**
> This disables TargetRpc links.
### :gear: **ServerRpcs**
> This disables ServerRpcs links.
### :gear: **ReplicateRpcs**
> This disables ReplicateRpc links.
### :gear: **ReconcileRpcs**
> This disables ReconcileRpc links.
@@ -0,0 +1,50 @@
---
description: >-
The NetworkManager is an essential component for running the client and
server. It acts as a bridge between core components and configuring your
network.
---
# NetworkManager
## Description
The **NetworkManager** is the central component of FishNet that manages the networking lifecycle, including establishing connections, hosting sessions, and handling client-server communication. Although this component manages the network, it should not itself be a networked object, and must not contain a [Network Object](../network-object.md) component on the same object, or as a parent or child of it. Additionally, the Network Manager can be used to register components and access them directly from it. This can be useful for other manager like scripts.
The Network Manager utilizes several sub-manager components, which it will add at runtime if they do not already exist on the object.
{% hint style="success" %}
Check out its API page for more specific methods and events [here](https://fish-networking.com/FishNet/api/api/FishNet.Managing.NetworkManager.html).
{% endhint %}
## Settings <a href="#server-and-host" id="server-and-host"></a>
<div align="left"><figure><img src="../../../.gitbook/assets/network-manager-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Run In Background**
> This allows the application to run in the background when true. Running in the background is often essential for clients, and especially for the server.
### :gear: **Don't Destroy On Load**
> This will ensure the Network Manager persist between scene changes. If you are using only one Network Manager it's best to leave this true.
### :gear: **Persistence**
> This option specifies how to behave when multiple NetworkManagers exist in your game.
### :gear: **Logging**
> This lets you specify what actions to log for builds, editor, and headless mode. When the field is not populated, the default logging settings are used. To make a custom logging settings open your create menu and choose: **Tools > Fish-Networking > Logging > Logging Configuration.**
### :gear: **Spawnable Prefabs**
> This option dictates which prefabs collection to use for networked objects. By default this field is automatically set to DefaultPrefabObjects for any saved scene; you can however make your own PrefabObjects class with customized rules and applications.
### :gear: **Object Pool**
> Which object pooling script to use. When not set, DefaultObjectPool is added automatically at run-time. You may inherit from ObjectPool to create your own.
### :gear: **Refresh Default Prefabs**
> While true, this will refresh the DefaultPrefabCollection every time play mode is entered. This is generally not needed to be enabled, but can be useful if your prefab collection is regularly becoming corrupted through symlinks.
@@ -0,0 +1,61 @@
---
description: >-
The ObserverManager assists in controlling what network objects each client
may see.
---
# ObserverManager
## Description <a href="#server-and-host" id="server-and-host"></a>
**ObserverManager** is used to globally customize the observer system. Observer conditions within the ObserverManager will be automatically added to [NetworkObjects](../../../../guides/features/networked-gameobjects-and-scripts/networkobjects/), unless the [NetworkObserver](../../network-observer.md) component is set to ignore the manager.
{% hint style="success" %}
Check out its API page for more specific methods and events [here](https://fish-networking.com/FishNet/api/api/FishNet.Managing.Observing.ObserverManager.html).
{% endhint %}
## Settings <a href="#server-and-host" id="server-and-host"></a>
<div align="left"><figure><img src="../../../../.gitbook/assets/observer-manager-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Update Host Visibility**
> This will hide renderers on networked objects which are hidden to host client. When false, all networked objects will be visible to the host client even if these objects would normally be despawned for the client.
### :gear: **Maximum Timed Observers Duration**
> The maximum duration that the server will take to update timed observer conditions as server load increases. Lower values will result in timed conditions being checked quicker at the cost of performance.
### :gear: **Default Conditions**
> These are [Observer Conditions](../../../scriptableobjects/observerconditions/) which will be added to all NetworkObjects by default.
>
> Almost all games should utilize at least the [Scene Observer Condition](../../../scriptableobjects/observerconditions/scenecondition.md).
### :gear: Use **Level of Detail**
> This will enable the [LOD system](../../../../guides/features/level-of-detail.md) and show the options for configuring it. It requires [FishNet Pro](../../../../guides/updating-fishnet/upgrading-to-fishnet-pro.md).
### :gear: Maximum Send Interval
> The upper limit for how long (in seconds) the system will wait between updates for objects in the furthest LOD bracket. If set to `5`, the most distant objects will only receive updates once every 5 seconds.
### :gear: Recalculation Duration
> This determines how quickly (in seconds) the server cycles through objects to update their current LOD status.
>
> This value scales automatically if the server's frame rate is capped. Lower values are generally more ideal to ensure objects transition between LOD brackets responsively.
>
> Use `SetLevelOfDetailRecalculationDuration(float duration)` if you want to adjust this value at run-time.
### :gear: **Level of Detail Distances**
> This is a list of distance thresholds. Each entry defines a "bracket" for synchronization frequency.
>
> _Example:_ If you have two distances set to `5` and `15`, FishNet will run with the following setup:
>
> * Near (< 5 units): Objects sync at the standard, full-speed interval.
> * Mid (5 to 14.9 units): Objects sync at a reduced "mid-tier" frequency.
> * Far (≥ 15 units): Objects sync at the maximum allowed delay.
>
> The system uses an **exponential scaling** method to determine how often updates are sent for each distance bracket. This ensures a smooth transition between high-frequency updates for nearby objects and low-frequency updates for distant ones.
@@ -0,0 +1,23 @@
---
description: >-
The HashGrid is the managing script for when using the Grid Observer
Condition.
---
# HashGrid
## Description
The **HashGrid** is required when using the [Grid Condition](../../network-observer.md). This component is responsible for managing the grid and providing information to grid objects. While grids are less accurate than using the [Distance Condition](../../../scriptableobjects/observerconditions/distancecondition.md) they do provide better performance. HashGrid must be placed on or beneath the [NetworkManager ](../network-manager.md)object.
## Settings
<div align="left"><figure><img src="../../../../.gitbook/assets/hash-grid-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Grid Axes**
> These are which axes to base the grid on. Whichever axis is excluded will not have it's values considered in calculations. For example, if you are developing a 2D game most likely only XY matters, so you would choose the XY axes.
### :gear: **Accuracy**
> This determines how close a client's [FirstObject](https://fish-networking.com/FishNet/api/api/FishNet.Connection.NetworkConnection.html#FishNet_Connection_NetworkConnection_FirstObject) must be (in Unity units) to be considered in range. Note that accuracy is not as precise as when using a [Distance Condition](../../../scriptableobjects/observerconditions/distancecondition.md).
@@ -0,0 +1,39 @@
---
description: >-
The PredictionManager provides states, callbacks, and settings to fine tuning
prediction for your game type.
---
# PredictionManager
## Description <a href="#server-and-host" id="server-and-host"></a>
The **PredictionManager** is a core component responsible for managing the prediction system, which allows clients to predict their own actions and then reconcile (correct) their state when authoritative updates are received from the server. It allows you to tweak various global prediction settings and get certain prediction callbacks.
{% hint style="success" %}
Check out its API page for more specific methods and events [here](https://fish-networking.com/FishNet/api/api/FishNet.Managing.Predicting.PredictionManager.html).
{% endhint %}
## Settings <a href="#server-and-host" id="server-and-host"></a>
<div align="left"><figure><img src="../../../.gitbook/assets/prediction-manager-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: Create Local States
> When enabled this allows the client to create local reconcile states which means reconciles can be sent less frequently and provide data to use for reconciles when packets are lost.
### :gear: State **Interpolation**
> This is how many states to try and hold in a buffer before running them on clients. Larger values add resilience against network issues at the cost of running states later.
### :gear: State **Order**
> The order in which clients run states. **Future** favors performance and does not depend upon reconciles, while **Past** favors accuracy but clients must reconcile every tick.
### :gear: **Drop Excessive Replicates**
> Toggle the setting to true to drop excessive client replicates, helping prevent attacks but risking temporary desynchronization during connectivity issues. Set to false to store up to 3 seconds of replicates, processing multiple per tick for quicker cache clearing. This approach ensures all inputs are executed but could enable speed hacking. When false, replicated data is consumed more quickly if the cache limit is exceeded.
### :gear: Maximum Server Replicates
> This is shown when the **Drop Excessive Replicates** is enabled. This value indicates the maximum number of replicates which the server will cache from client before dropping old ones. Higher values will reduce the chance of dropped input when the client's connection is unstable, but will potentially add latency to the client's object both on the server and client. Generally, cached replicates will never significantly exceed Queued Inputs.
@@ -0,0 +1,31 @@
---
description: >-
RollbackManager contains configurations and optimizations for how colliders
are sent back in time when using lag compensation.
---
# RollbackManager (Pro Feature)
## Description <a href="#server-and-host" id="server-and-host"></a>
The RollbackManager must be added and configured properly for lag compensation to function properly. Objects you wish to rollback must contain the[ ColliderRollback](../colliderrollback.md) script on them. You can learn more about using it on this page: [lag-compensation](../../../guides/features/lag-compensation/ "mention")
{% hint style="success" %}
Check out its API page for more specific methods [here](https://fish-networking.com/FishNet/api/api/FishNet.Component.ColliderRollback.RollbackManager.html).
{% endhint %}
## Settings <a href="#server-and-host" id="server-and-host"></a>
<div align="left"><figure><img src="../../../.gitbook/assets/rollback-manager-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Bounding Box Layer**
> This is the layer to first test against before rolling back colliders. When a layer is specified a collider will be added to your [ColliderRollback](../colliderrollback.md) objects; because of this, be sure to use a layer which has no physics intersections and is not used for anything else.
### :gear: **Maximum Rollback Time**
> This is the maximum of seconds colliders may rollback. Using a value of 1f would allow colliders to rollback at most one second in the past, which is a very reasonable amount of time given typical player latencies are less than 100ms.
### :gear: **Interpolation**
> This is the amount of interpolation you are using on your [NetworkTransform](../network-transform.md) components. Or if you are using rigidbodies with prediction this would be the **interpolation** value on the smoothing component.
@@ -0,0 +1,38 @@
---
description: >-
The SceneManager handles networking scenes between the server and clients,
including updating active scenes, addressable scenes, provide helpful
callbacks, and more.
---
# SceneManager
## Description <a href="#server-and-host" id="server-and-host"></a>
FishNet’s **SceneManager** provides robust, synchronized, and event-driven scene management for networked Unity games, ensuring all clients and the server remain in sync throughout complex scene operations. It is responsible for coordinating which scenes are loaded or unloaded across all clients and the server, ensuring synchronization and exposes many options for the loading of scenes. There are multiple guides that are worth reading about it: [scene-management](../../../guides/features/scene-management/ "mention")
The callbacks within the SceneManager are informative and quite useful, well worth looking into!
{% hint style="success" %}
Check out its API page for more specific methods and events [here](https://fish-networking.com/FishNet/api/api/FishNet.Managing.Scened.SceneManager.html).
{% endhint %}
## Settings <a href="#server-and-host" id="server-and-host"></a>
<div align="left"><figure><img src="../../../.gitbook/assets/scene-manager-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Scene Processor**
> This determines how scene loads occur. When left empty the default scene processor is used. For more information on scene processing and addressables see [here.](../../../guides/features/scene-management/custom-scene-processors/addressables.md)
### :gear: **Light Probe Updating**
> This controls how light probes are updated after scenes are loaded.
### :gear: **Move Client Host Objects**
> When enabled this will move objects visible to the host client to a temporary scene rather than let them be destroyed when a scene is unloaded. Objects are then destroyed next tick by the host client. This ensures that server and client side callbacks will work properly on the moved objects.
### :gear: **Set Active Scene**
> This will allow the **SceneManager** to pick which scene to set as the active scene when loading and unloading scenes. By default global scenes are used, and if no global scenes then the clients single scene.
@@ -0,0 +1,63 @@
---
description: >-
The ServerManager handles validation of clients and a variety of settings only
applicable to the server.
---
# ServerManager
## Description <a href="#server-and-host" id="server-and-host"></a>
The **ServerManager** is a central component responsible for handling server-related data and actions. It maintains information and handles operations for server-side networked objects as well as tracking connected clients, both authenticated and unauthenticated. Additionally, it monitors client timeouts and disconnects unresponsive clients.
The **ServerManager** can be used directly to start and stop the FishNet server as well as monitor its state and send [broadcasts](../../../guides/features/network-communication/broadcasts.md) to the clients.
{% hint style="success" %}
Check out its API page for more specific methods and events [here](https://fish-networking.com/FishNet/api/api/FishNet.Managing.Server.ServerManager.html).
{% endhint %}
## Settings <a href="#server-and-host" id="server-and-host"></a>
<div align="left"><figure><img src="../../../.gitbook/assets/server-manager-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **SyncType Rate**
> This is the default send rate for [SyncTypes](../../../guides/features/network-communication/synchronizing/). Setting it to 0 will send updates every tick. This value can be overridden for individual SyncTypes.
### :gear: **Spawn Packing**
> This determines how well transform properties will be packed[^1] when being sent in a spawn message. If transforms spawn marginally off reducing the packing may help.
>
> These can be edited for **Position**, **Rotation** and **Scale** independently.
### :gear: **Change Frame Rate**
> When enabled, this will change the frame rate limitation when acting as server only.
>
> * **Frame Rate** is the frame rate to use while only the server is active. There is also a setting for client frame rate on the [ClientManager](clientmanager.md). When both server and client are active the higher of the two frame rates will be used.
### :gear: **Start On Headless**
> When this is enabled, FishNet will automatically start the server when loaded on a server (headless) build.
### :gear: **Remote Client Timeout**
> This decides if the server should disconnect clients which seem unresponsive. This feature can be set to disabled, work in development and releases, or only releases.
>
> * **Timeout** is how long the client must be unresponsive before they are kicked.
### :gear: **Share Ids**
> While true, this enables clients to be aware of other clients in-game and objects owned by other clients. Objects owned by other clients are only known if they are available to the local client, such as through the observer system. Client Ids are not sensitive information but leaving this option enabled will use slightly additional bandwidth.
### :gear: **Authenticator**
> This is where you can specify which [authenticator](../utilities/authenticator.md) to use. When left empty clients may join the server without specialized authentication.
### :gear: **Allow Predicted Spawning**
> This option lets prefabs and scene objects be setup to use [Predicted Spawning](../../../guides/features/networked-gameobjects-and-scripts/spawning/predicted-spawning.md). You can use this setting to enable or disable predicted spawning without having to change the settings for every object. This value may also be set at runtime. If changing at runtime be certain to also change on the client; otherwise they could be kicked for trying to use a disabled feature.
>
> * **Reserved Object Ids** is the number of ObjectIds to reserve per client for predicted spawning. Clients will start out with the specified number of Ids and receive new ones as the server validates their predicted spawning requests. For example: if this value was set to 15 and a client with a 100ms ping sent 3 predicted spawns in one tick then they would have only 12 predicted spawns left to use until the server responded with 3 new Ids, which would be approximately 50ms later.
[^1]: compressed together to save bandwidth
@@ -0,0 +1,31 @@
---
description: >-
The StatisticManager provides statics about Fish-Networking for a variety of
tasks, including monitoring network traffic.
---
# StatisticsManager
## Description <a href="#server-and-host" id="server-and-host"></a>
The **Statistics Manager** component is responsible for tracking and reporting network traffic statistics for your multiplayer game. Its **Network Traffic** can be used to gain basic information about how much network traffic your game is using. These values must be enabled for the [BandwidthDisplay](../utilities/bandwidthdisplay.md) component to function.
{% hint style="success" %}
Check out its API page for more specific methods and events [here](https://fish-networking.com/FishNet/api/api/FishNet.Managing.Statistic.StatisticsManager.html).
{% endhint %}
## Settings <a href="#server-and-host" id="server-and-host"></a>
<div align="left"><figure><img src="../../../.gitbook/assets/statistics-manager-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Update Interval**
> This is how often network traffic related operations occur, such as invoking update events.
### :gear: **Update Client**
> This will invoke client traffic updates when enabled.
### :gear: **Update Server**
> This will invoke server traffic updates when enabled.
@@ -0,0 +1,49 @@
---
description: The TimeManager handles and provides callbacks related to network timing.
---
# TimeManager
## Description <a href="#server-and-host" id="server-and-host"></a>
The **TimeManager** component is responsible for managing network time and tick-based systems within the networking framework. It is central to keeping networked objects synchronized in time, handling ticks, timing conversions, physics step control, and providing hooks for network-related timing events in FishNet. It does this by managing how network timing is performed, either using fixed ticks or variable intervals and by providing precise timing for sending and receiving network data, ensuring synchronization between server and clients. It also controls the physics simulation mode (manual, automatic, or disabled) to maintain consistent simulation across the network.
{% hint style="success" %}
Check out its API page for more specific methods and events [here](https://fish-networking.com/FishNet/api/api/FishNet.Managing.Timing.TimeManager.html).
{% endhint %}
## Settings <a href="#server-and-host" id="server-and-host"></a>
<div align="left"><figure><img src="../../../.gitbook/assets/time-manager-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Update Order**
> Controls when the TimeManager will invoke its version of Unity callbacks. BeforeTick would be a good option if you wanted to collect input in OnUpdate before the tick occurred.
### :gear: **Timing Type**
> Dictates when data is sent and read. When set to Tick data is only processed on frames which also tick. When Variable is selected data will be sent and read every frame, when available.
### :gear: **Allow Tick Dropping**
> Will let the client skip ticks when they occur several times over a single frame. This can be useful to prevent the client from running an increasing number of simulations per frame, resulting in more performance loss.
### :gear: **Maximum Frame Ticks**
> This is shown when **Allow Tick Dropping** is enabled. This value is the maximum number of ticks that can occur per frame before the client begins dropping ticks to recover performance.
### :gear: **Tick Rate**
> This is an average of how many times per second the TimeManager will invoke tick events, as well how often data may be sent or received.
### :gear: **Ping Interval**
> How often, in seconds, a user receives a ping update. A larger ping has a very small chance of server tick synchronization losing accuracy. These changes do not affect prediction.
### :gear: **Timing Interval**
> This is how many seconds between prediction timing updates. Lower values will result in marginally more accurate timings at the cost of bandwidth.
### :gear: **Physics Mode**
> The Physics Mode determines how physics are run. **Unity** will let the engine manage physics. **TimeManager** simulates physics on ticks. When using Client-Side Prediction you must use the **TimeManager** setting.
@@ -0,0 +1,42 @@
---
description: >-
The TransportManager handles talking to the transports as well sending,
receiving, and even customizing packets on the fly.
---
# TransportManager
## Description
The **TransportManager** in FishNet is a central component responsible for communicating with the underlying network transport to send and receive data. It acts as the bridge between FishNet’s networking system and the actual transport layer, enabling networked games to send/receive packets to and from clients and servers. There is also support for latency simulation for testing different network conditions.
With the TransportManager you can optionally utilize an intermediate layer to modify data before it’s sent or after it’s received (e.g., encryption, compression).
If you want to modify network data such as for encryption, or use any one of our number of transports, you will want to add this component to your [NetworkManager](../network-manager.md) game object.
{% hint style="success" %}
Check out its API page for more specific methods and events [here](https://fish-networking.com/FishNet/api/api/FishNet.Managing.Transporting.TransportManager.html).
{% endhint %}
## Settings
<div align="left"><figure><img src="../../../../.gitbook/assets/transport-manager-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Transport**
> This field indicates which [transport](../../../../guides/high-level-overview/transports.md) to use. When left empty, the default transport ([Tugboat](../../../transports/tugboat.md)) is used, or the first transport manually added to the object which the TransportManager resides.
### :gear: **Intermediate Layer**
> This is used to specify a custom [intermediate layer](intermediatelayer.md) to use.
### :gear: Latency Simulator
> These settings allow you to simulate a variety of latency scenarios on any transport.
>
> * **Enabled:** Toggles the enabled state of the simulator.
> * **Simulate Host:** When enabled, this will also simulate latency for host client.
> * **Latency:** Is the amount of latency to simulate in milliseconds.
> * **Unreliable:** Features only used for unreliable packets.
> * **Out Of Order:** The percentage chance to send an out of order packet.
> * **Packet Loss:** The chance to drop a packet.
@@ -0,0 +1,94 @@
---
description: >-
The IntermediateLayer is a pass-through for data in and out. This feature can
be used to encrypt data, inject headers, and more.
---
# IntermediateLayer
Using the IntermediateLayer is simple as overriding two methods, one for when data is sent and one for when data is received.
Below is an example included with FishNet which demonstrates using a Caesar cipher to encrypt data.
You can find this example in the Demos folder, file name **IntermediateLayerCipher.cs**.
```csharp
using FishNet.Managing.Transporting;
using System;
namespace FishNet.Example.IntermediateLayers
{
/* Below is an example of creating a basic Caesar Cipher.
* Bytes are modified by a set value of CIPHER_KEY, and then
* the original src ArraySegment is returned.
*
* It's very important to only iterate the bytes provided
* as the segment. For example, if the ArraySegment contains
* 1000 bytes but the Offset is 3 and Count is 5 then you should
* only iterate bytes on index 3, 4, 5, 6, 7. The code below
* shows one way of properly doing so.
*
* If you are to change the byte array reference, size, or segment
* count be sure to return a new ArraySegment with the new values.
* For example, if your Offset was 0 and count was 10 but after
* encrypting data the Offset was still 0 and count 15 you would
* return new ArraySegment<byte>(theArray, 0, 15); */
public class IntermediateLayerCipher : IntermediateLayer
{
private const byte CIPHER_KEY = 5;
// Decipher incoming data.
public override ArraySegment<byte> HandleIncoming(ArraySegment<byte> src, bool fromServer)
{
byte[] arr = src.Array;
int length = src.Count;
int offset = src.Offset;
for (int i = src.Offset; i < (offset + length); i++)
{
short next = (short)(arr[i] - CIPHER_KEY);
if (next < 0)
next += 256;
arr[i] = (byte)next;
}
return src;
}
// Cipher outgoing data.
public override ArraySegment<byte> HandleOutgoing(ArraySegment<byte> src, bool toServer)
{
byte[] arr = src.Array;
int length = src.Count;
int offset = src.Offset;
for (int i = offset; i < (offset + length); i++)
{
short next = (short)(arr[i] + CIPHER_KEY);
if (next > byte.MaxValue)
next -= 256;
arr[i] = (byte)next;
}
return src;
}
}
}
```
In some cases you may need to inject headers into data sent, such as if you are validating each packet with an authorization key.
If such is the case it may be wise to reserve a number of bytes needed for your header. You can do this by calling SetMTUReserve() on your TransportManager.\
\
Here is an example of doing such.
```csharp
public class MyIntermediateLayer : IntermediateLayer
{
public override void InitializeOnce(TransportManager manager)
{
base.InitializeOnce(manager);
const int bytesForMyHeader = 10;
manager.SetMTUReserve(bytesForMyHeader);
}
// ...rest omitted
```
@@ -0,0 +1,22 @@
---
description: >-
NetworkBehaviour allows your scripts to perform networked actions, such as
synchronizing data, responding to network events, and handling remote
procedure calls (RPCs).
---
# NetworkBehaviour
## Description
NetworkBehaviour(s) cannot be added to objects directly. This script must be inherited from before it may be included on an object. Inheriting from NetworkBehaviour allows access to [network communications](../../../guides/high-level-overview/terminology/communicating.md) and other useful data about the network, server, and client.
Each NetworkBehaviour must be attached to a GameObject that also has a NetworkObject component on it or one of its parent objects.
{% hint style="danger" %}
Adding a NetworkBehaviour derived component at run-time is not yet supported.
{% endhint %}
Please check out the guide page for more information about all the things you can do with NetworkBehaviours:
<table data-view="cards"><thead><tr><th align="center"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="1f4d8">📘</span> <mark style="color:blue;">NetworkBehaviour Guide</mark></td><td><a href="../../../guides/features/networked-gameobjects-and-scripts/network-behaviour-guides.md">network-behaviour-guides.md</a></td></tr><tr><td align="center">🔌 <mark style="color:yellow;">NetworkBehaviour API</mark></td><td><a href="https://fish-networking.com/FishNet/api/api/FishNet.Object.NetworkBehaviour.html">https://fish-networking.com/FishNet/api/api/FishNet.Object.NetworkBehaviour.html</a></td></tr></tbody></table>
@@ -0,0 +1,21 @@
---
description: >-
The TickNetworkBehaviour subscribes to tick events making them available as
virtual methods.
---
# TickNetworkBehaviour
## Description
This abstract class makes it easy to use the various tick events with simple overrides.
You can change the active event subscriptions through the inspector or through code with the `SetTickCallbacks` method.
## Settings
<figure><img src="../../../.gitbook/assets/ticknetworkbehaviour-editor.png" alt=""><figcaption></figcaption></figure>
### :gear: **Tick Callbacks**
> The Tick Callbacks field lets you choose which timing events the component automatically subscribes to.
@@ -0,0 +1,91 @@
---
description: >-
This component is attached automatically anytime a script which inherits from
NetworkBehaviour is added to your object.
---
# NetworkObject
## Description
The **NetworkObject** component is essential for any game object that needs to be synchronized or controlled over the network using FishNet. It acts as the anchor for all [networked behaviors](../../guides/features/networked-gameobjects-and-scripts/network-behaviour-guides.md) and manages [identification](../../guides/features/server-and-client-identification/), [ownership](../../guides/features/ownership/), and the object's lifecycle within the networking system.
You can nest network objects, place them in scenes, or in prefabs, but the component itself cannot be added to a game object at run-time.
{% hint style="success" %}
Check out the API page for more specific methods, properties, and events [here](https://fish-networking.com/FishNet/api/api/FishNet.Object.NetworkObject.html).
{% endhint %}
## Settings
{% tabs %}
{% tab title="Settings" %}
<div align="left" data-full-width="false"><figure><img src="../../.gitbook/assets/network-object-component.png" alt=""><figcaption><p>Default settings in the <strong>Settings</strong> tab</p></figcaption></figure></div>
:gear: **Is Networked**
> Indicates if an object should always be considered a networked object. When false the object will not initialize as networked. This may be useful if you have objects that you sometimes want to only run locally, and other times spawn over the network. Anytime an object is spawned using [ServerManager.Spawn](../../guides/features/networked-gameobjects-and-scripts/spawning/) _Is Networked_ automatically becomes true for that instantiated copy.
:gear: **Is Spawnable**
> This should be enabled if the object can spawn at runtime; this is generally false for scene prefabs as you do not need to instantiate and manually spawn them. While true, this object's prefab will be added to [DefaultPrefabObjects](../scriptableobjects/spawnableprefabs/defaultprefabobjects.md).
:gear: **Is Global**
> When enabled, this will make the **NetworkObject** known to all clients at all times, the object will also be added to the [Don't Destroy on Load](https://docs.unity3d.com/ScriptReference/Object.DontDestroyOnLoad.html) scene. This setting will have **no** effect on [scene objects](../../guides/high-level-overview/terminology/miscellaneous.md#scene-object), but for instantiated objects it may be set in the prefab or changed at run-time immediately after instantiating the object.
:gear: **Initialize Order**
> Determines the order in which **NetworkObjects** spawned in the same tick will run their [initialization callbacks](../../guides/features/networked-gameobjects-and-scripts/network-behaviour-guides.md#callbacks). A lower value will have higher priority and execute first. The default value is 0 and negative values are allowed. On the server or clientHost, this value is not used and initialization order dependent upon the order Spawn is called.
:gear: **Prevent Despawn On Disconnect**
> This will ensure the object will not be destroyed or despawned when the owning client disconnects.
:gear: **Default Despawn Type**
> This is the default behavior when despawning the object. Objects are typically destroyed when despawned, but this can be set to other values, such as _Pool_, to save performance.
>
> Check out the [object-pooling.md](../../guides/features/networked-gameobjects-and-scripts/spawning/object-pooling.md "mention")guide for more information.
:gear: **Use Level of Detail**
> This can enable the use of [Level of Detail](../../guides/features/level-of-detail.md) on this NetworkObject. The LOD system must be enabled on the [ObserverManager](managers/observermanager/) for this to work.
{% endtab %}
{% tab title="Prediction" %}
<div align="left"><figure><img src="../../.gitbook/assets/network-object-prediction-component.png" alt=""><figcaption><p>Default settings in the <strong>Prediction</strong> tab</p></figcaption></figure></div>
:gear: **Enable Prediction**
> This should be used to set whether the object is making use of [prediction](../../guides/features/prediction/what-is-client-side-prediction.md) or not. Enabling this will make available the following settings:
:gear: **Prediction Type**
> You can use this to set if you are using rigidbodies or not for the predicted object. For example, if you were updating your transform with a CharacterController component this would be set to _Other_. If you were using rigidbodies you would choose _Rigidbody_ or _Rigidbody2D_.
:gear: **Enable State Forwarding**
> This is used to forward the replicate and reconcile states to all clients. This is ideal for games where you want all clients and server to run the same inputs. Disabling this setting will cause prediction to only be used on the owner; you will then have to synchronize to spectators using other means, such as a [NetworkTransform](network-transform.md) or custom script.
:gear: **Graphical Object**
> This is the object which holds the graphics for your predicted object. When using client-side prediction all predicted objects must have their graphics as a child of the predicted object. For example, if your rigidbody and collider are on the root object, the graphics must remain beneath the root and set as the graphical object.
:gear: **Detach Graphical Object**
> When **true**, this will detach and re-attach the graphical object at runtime when the client initializes/de-initializes the item. This can resolve camera jitter or be helpful objects child of the graphical which do not handle reconiliation well, such as certain animation rigs. Transform is detached after [OnStartClient](../../guides/features/networked-gameobjects-and-scripts/network-behaviour-guides.md#onstartclient), and reattached before [OnStopClient](../../guides/features/networked-gameobjects-and-scripts/network-behaviour-guides.md#onstopclient).
:gear: **Interpolation**
> Is how many ticks to interpolate the graphics on client owned objects. A setting as low as 1 can usually be sufficient to smooth over the frames between ticks.
:gear: **Enable Teleport**
> This will allow the graphical object to teleport to it's actual position – also known as the root position – if the position changes are drastic. Ideally you will not need this setting, but it's an available option should you desire to use it.
:gear: **Teleport Threshold**
> This is shown while teleporting is enabled. If the graphical object's position is this many units away from the actual position, then the graphical object will teleport to the actual position.
{% endtab %}
{% endtabs %}
@@ -0,0 +1,45 @@
---
description: >-
This component lets you override the default observer conditions for a
specific network object.
---
# NetworkObserver
## Description <a href="#conditions" id="conditions"></a>
The **NetworkObserver** uses conditions to determine if a client qualifies to be an observer of an object; any number of conditions may be used and a client will be considered an observer of the object if he passes all active conditions. The NetworkObserver component can be used to override the [ObserverManager](managers/observermanager/), or add additional conditions onto the object to which the NetworkObserver is added.
{% hint style="warning" %}
When adding this component manually, be careful not to unintentionally override the default scene observer condition of the object by using the **Ignore Manager** override type setting.
{% endhint %}
This component will be added to a network object at run-time if it doesn't already exist.
{% hint style="success" %}
Check out the API page for specific methods, and properties [here](https://fish-networking.com/FishNet/api/api/FishNet.Observing.NetworkObserver.html).
{% endhint %}
## Conditions <a href="#conditions" id="conditions"></a>
There are [several included conditions](../scriptableobjects/observerconditions/), which may be used together. ObserverCondition may also be inherited from [to make your own conditions](../../guides/features/observers/custom-conditions.md). When all conditions are true, the object will become visible to the client.
Each condition must be created as a scriptable object, and dropped into the Network Observer component.
## Settings <a href="#component-settings" id="component-settings"></a>
<div align="left"><figure><img src="../../.gitbook/assets/network-observer-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Override Type**
> This is used to change how the **NetworkObserver** component uses the [ObserverManager](managers/observermanager/) settings. _Add Missing_ will add any conditions from the ObserverManager which are not already on the NetworkObserver. _UseManager_ replaces conditions with those from the manager. _Ignore Manager_ will keep the NetworkObserver conditions, ignoring the ObserverManager entirely.
>
> _Add Missing_ is usually the recommended option.
### :gear: **Update Host Visibility**
> This will change the visibility of renderers for the host client when server objects are not visible to the client. If you wish to enable and disable other aspects during a visibility change consider using the [`NetworkObject.OnHostVisibilityUpdated`](https://fish-networking.com/FishNet/api/api/FishNet.Object.NetworkObject.html#FishNet_Object_NetworkObject_OnHostVisibilityUpdated) event.
### :gear: **Observer Conditions**
> This is a list of which observer conditions to use. You can find out more about the specific ones here: [observerconditions](../scriptableobjects/observerconditions/ "mention")
@@ -0,0 +1,63 @@
---
description: The NetworkTransform synchronizes transform properties across the network.
---
# NetworkTransform
## Description <a href="#server-and-host" id="server-and-host"></a>
NetworkTransform is FishNet’s robust solution for syncing transform data (position, rotation, scale) over the network, supporting both server and client authority, smooth movement, and scene hierarchy handling. It is essential for multiplayer games where objects need to appear at the same place for all players.
You may place as many NetworkTransforms as you like on children. A single NetworkTransform will synchronize the object it is directly on.
{% hint style="info" %}
Check out the [moving-your-player-around.md](../../tutorials/getting-started/moving-your-player-around.md "mention") guide for an example of using the **Network Transform** to sync basic player movement.
{% endhint %}
{% hint style="success" %}
Check out the API page for more specific methods, properties, and events [here](https://fish-networking.com/FishNet/api/api/FishNet.Component.Transforming.NetworkTransform.html).
{% endhint %}
## Settings <a href="#server-and-host" id="server-and-host"></a>
<div align="left"><figure><img src="../../.gitbook/assets/network-transform-expanded-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Component Configuration**
> The **Component Configuration** attempts to automatically configure components used to move your object. For example, if you were to use a CharacterController you could change this setting to **CharacterController** and the CharacterController will be automatically configured based on other **NetworkTransform** settings. This feature does not change owner smoothing; for example, if you are using a client authoritative rigidbody setting the Component Configuration to rigidbody will not interpolate the rigidbody for owner, but rather configures the rigidbody on non-owners and server so the NetworkTransform can smooth it properly.
### :gear: **Synchronize Parents**
> When enabled, this will automatically synchronize which objects the transform is attached to.
### :gear: **Packing**
> These settings determine the level of packing for each transform property. In some instances you may want more precision; **Unpacked** will give you the most precisio&#x6E;**, Packed** will give you the least amount of precision, and **Packed Less** will give you an in-between amount. Less packing equals more precision at the cost of more network bandwidth used.
### :gear: Interpolation
> This is how long of a buffer to create when replicating the transform. Larger interpolation values will reduce the chance of jitter should there be network lag in favor of the transform being further in the past.
### :gear: **Extrapolation (pro feature)**
> This is how long the transform will try to predict movement when new data is expected, but does not arrive. Using a low interpolation value mixed with extrapolation is a great way to get responsive movement without showing network latency.
### :gear: **Enable Teleport**
> This option allows the **NetworkTransform** to teleport the object instead of smoothly moving it over several frames once the distance moved in an instance is greater than the set threshold.
### :gear: **Teleport Threshold**
> This is how far the transform must travel in a single update to cause a teleport rather than smoothing. Using a value of 0f will teleport every frame and will result in no smoothing at all.
### :gear: **Client Authoritative**
> as true allows the owning client to make changes to their transform locally, and those changes will be sent to the server and other clients. While false the server must change transforms to have them sent to clients.
### :gear: **Send Interval**
> determines at most how often in ticks the NetworkTransform may send. A value of 1 indicates the NetworkTransform can send every tick, if there is change. A value of 5 would mean that the NetworkTransform will send at most every 5 ticks, even if there is change between each tick. For example: if using an interval of 5 and the transform changes and sends on tick 100, then changes on 101, the next update will not send until 105.
### :gear: **Synchronize Position, Rotation, Scale**
> The **Synchronize** settings let you choose which properties to synchronize. Only changed values will send over the network, but if you do not want a value to update at all you can turn off synchronization for a transform property. The **Snapping** settings will allow the transform to snap axes rather than smooth them over time. This feature is commonly used for 2D games, such if you wanted to flip the Y axis on rotation immediately.
@@ -0,0 +1,77 @@
---
description: The NetworkAnimator component synchronizes animations across the network.
---
# NetworkAnimator
## Description
FishNet's **Network Animator** is a component designed to synchronize Unity’s Animator state and parameters over the network. It supports both server-authoritative and client-authoritative modes. In client authority mode, the owner client can send animation parameter changes to the server, which then relays them to other clients.
{% hint style="info" %}
This component does not align with our Client-Side prediction API. You may still use the NetworkAnimator with prediction but the animations likely be updated slightly before the prediction state runs.
{% endhint %}
You may place as many NetworkAnimators as you like on children or root. When an animator is not specified on the Animator field the first one on the same object is used.
{% hint style="success" %}
Check out the API page for specific methods, and properties [here](https://fish-networking.com/FishNet/api/api/FishNet.Component.Animating.NetworkAnimator.html).
{% endhint %}
## Settings <a href="#server-and-host" id="server-and-host"></a>
<div align="left"><figure><img src="../../.gitbook/assets/network-animator-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Animator**
> This field indicates which Animator to synchronize over the network. The referenced animator can be anywhere on the object. You may also change the Animator at runtime using Network Animator API.
### :gear: **Synchronize When Disabled**
> When enabled, this will allow the **NetworkAnimator** to synchronize changes even when the **Animator** component is disabled.
### :gear: **Interpolation**
> This is how many ticks of interpolation to use. Like the [NetworkTransform](network-transform.md), the animator will be this number of ticks behind before iterating data. To use tick alignment with a NetworkTransform, use the same value of interpolation as on the NetworkTransform.
### :gear: **Smooth Floats**
> This will ensure floats are moved over time on those receiving animator updates. This is commonly left true to allow blending between animation trees.
### :gear: **Client Authoritative**
> When this is enabled it allows the owning client to make changes to their animations locally, and those changes will be sent to the server and other clients. While disabled the server must change animations to have them sent to clients.
### :gear: **Send To Owner**
> This will only be displayed when _**Client Authoritative**_ is false. While _**Synchronize To Owner**_ is true the server will also send animation changes to the object owner; while false the owner will not get the animation changes by the server. This can be useful if you want to run animations locally in real time on owning clients.
### :gear: **Synchronized Parameters (pro feature)**
> These allow only specified parameters to be synchronized over the network. This can be useful if some parameters should only be used for the local client, or do not necessarily need to be networked.
## Runtime
The NetworkAnimator will detect values, layer weights, and speed changes automatically, and synchronize these changes efficiently.
However, most projects also depend on using crossfade, play, and other common Animator APIs.
To synchronize these actions over the network you will simply call each desired method on your NetworkAnimator reference.
```csharp
// This will perform Play on your animator, and synchronize the
// action over the network.
_myNetworkAnimator.Play(stringOrHash);
```
There are several more common methods in our NetworkAnimator component that you will want to use. To see all methods you're encouraged to view our [API](https://fish-networking.com/FishNet/api/api/FishNet.Component.Animating.NetworkAnimator.html) or simply open the NetworkAnimator source file.
Here are some examples of commonly used methods.
```csharp
_myNetworkAnimator.SetTriger(...)
_myNetworkAnimator.ResetTriger(...)
_myNetworkAnimator.CrossFade(...)
```
Other less commonly used actions are **SetController** and **SetAnimator.** You are encouraged to review the API on these when using, or even the XML when calling the method.
@@ -0,0 +1,31 @@
---
description: >-
The Player Spawner component can be used to spawn a game object for a client
once they connect to the game.
---
# PlayerSpawner
## Description <a href="#server-and-host" id="server-and-host"></a>
The **PlayerSpawner** component in FishNet is responsible for spawning player objects for clients when they connect to the server. You set the player prefab using the inspector or via the `SetPlayerPrefab` method. You can also define an array of spawn points (Transforms) for players (the **Spawns** array). If no spawn points are set, the prefab’s own position and rotation are used. You also have access to the `OnSpawned` event that fires on the server when a player is spawned.
{% hint style="success" %}
Check out the API page for specific fields and events [here](https://fish-networking.com/FishNet/api/api/FishNet.Component.Spawning.PlayerSpawner.html).
{% endhint %}
## Settings <a href="#server-and-host" id="server-and-host"></a>
<div align="left"><figure><img src="../../.gitbook/assets/player-spawner-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Player Prefab**
> This is used to select the prefab this component will instantiate for clients when they connect to the server.
### :gear: **Add to Default Scene**
> This is used to add a client to the active scene when no global scenes are specified through the [FishNet SceneManager](../../guides/features/scene-management/). This is important because FishNet doesn't force a client to start in the same scene as the server, so FishNet needs to be told if a client should observe a specific scene and receive information about the Network Objects in that scene.
### :gear: **Spawns**
> This is a list of GameObject Transforms that the **PlayerSpawner** will use as locations to spawn the players at. It will use them in order, one after another, looping once it reaches the final one. If none are given, then it will use the prefab's base position.
@@ -0,0 +1,17 @@
---
description: >-
Prediction components are for use with FishNet's prediction systems. Learn
more about each of them here!
---
# Prediction
There are a number of components specifically used for prediction. These include components specifically tied to the [Client-Side Prediction system](#user-content-fn-1)[^1] as well as ones that [are not](#user-content-fn-2)[^2]. Other components such as the NetworkObject can also have settings related to prediction, but they are not included in this subsection.
{% hint style="info" %}
Also consider viewing the [PredictionManager](../managers/predictionmanager.md) to customize global prediction settings.
{% endhint %}
[^1]: For example the NetworkColliders
[^2]: For example the Predicted Spawn and Predicted Owner
@@ -0,0 +1,17 @@
---
description: >-
The NetworkCollider components are a simple way to use Trigger and Collision
callbacks with prediction.
---
# Network Collider
Each component offers callbacks for OnEnter, OnStay, and OnExit, which work even during the prediction cycle. These components are needed because of a limitation in Unity's physics system that affects their OnCollisionEnter and OnCollisionExit methods, causing them to not always be executed.
{% hint style="success" %}
Fun fact: Fish-Networking is the only framework which provides a solution for using Enter/Exit collider callbacks with prediction!
{% endhint %}
{% hint style="warning" %}
Due to the complexity of physics with prediction we currently only support these components on primitive shapes: box, cube, sphere, circle, etc.
{% endhint %}
@@ -0,0 +1,29 @@
---
description: NetworkCollision is used to execute collision events for use with prediction.
---
# NetworkCollision
## Description
This component is used for receiving collision events for prediction enabled objects. It is very much equivalent to a Collider's `OnCollisionEnter`, `OnCollisionExit`, and `OnCollisionStay` messages, except that to receive these you would add this component to your game object and subscribe to its public events.
{% hint style="success" %}
Check out this API page [here](https://fish-networking.com/FishNet/api/api/FishNet.Component.Prediction.NetworkCollider.html) for the specific details.
{% endhint %}
## Settings
<div align="left"><figure><img src="../../../../.gitbook/assets/network-collision-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Maximum Simultaneous Hits**
> This is the maximum number of simultaneous hits that the component will check for. You can use this field to customize how many overlapping colliders the component should be able to detect. It should be noted that having too large of a value will decrease its performance. In most cases, the default value of 16 suffices.
### :gear: **Additional Size**
> The **Additional Size** determines the distance in units by which collision traces are extended. This extension helps prevent missed overlaps when colliders do not intersect sufficiently. Depending on the scale used in your game you may want to raise or lower this value.
### :gear: **Layers**
> These are the Layers to detect collisions on. This is used when value is not set as **Nothing**.
@@ -0,0 +1,35 @@
---
description: >-
NetworkCollision2D is used to execute collision2D events for use with
prediction.
---
# NetworkCollision2D
## Description
This component is used for receiving collision events for prediction enabled objects for 2D Colliders. It is very much equivalent to a Collider's `OnCollisionEnter`, `OnCollisionExit`, and `OnCollisionStay` messages, except that to receive these you would add this component to your game object and subscribe to its public events.
{% hint style="success" %}
Check out this API page [here](https://fish-networking.com/FishNet/api/api/FishNet.Component.Prediction.NetworkCollider2D.html) for the specific details.
{% endhint %}
## Settings
<div align="left"><figure><img src="../../../../.gitbook/assets/network-collision-2d-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Maximum Simultaneous Hits**
> This is the maximum number of simultaneous hits that the component will check for. You can use this field to customize how many overlapping colliders the component should be able to detect. It should be noted that having too large of a value will decrease its performance. In most cases, the default value of 16 suffices.
### :gear: **History Duration**
> This determines how long collision history is retained. Lower values optimize memory usage slightly, but may lead to the collision records becoming out of sync on clients with excessively high latency.
### :gear: **Additional Size**
> The **Additional Size** determines the distance in units by which collision traces are extended. This extension helps prevent missed overlaps when colliders do not intersect sufficiently. Depending on the scale used in your game you may want to raise or lower this value.
### :gear: **Layers**
> These are the Layers to detect collisions on. This is used when value is not set as **Nothing**.
@@ -0,0 +1,29 @@
---
description: NetworkTrigger is used to execute trigger events for use with prediction.
---
# NetworkTrigger
## Description
This component is used for receiving trigger events for prediction enabled objects for 2D Colliders. It is very much equivalent to a Collider's `OnTriggerEnter`, `OnTriggerExit`, and `OnTriggerStay` messages, except that to receive these you would add this component to your game object and subscribe to its public events.
{% hint style="success" %}
Check out this API page [here](https://fish-networking.com/FishNet/api/api/FishNet.Component.Prediction.NetworkCollider.html) for the specific details.
{% endhint %}
## Settings
<div align="left"><figure><img src="../../../../.gitbook/assets/network-trigger-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Maximum Simultaneous Hits**
> This is the maximum number of simultaneous hits that the component will check for. You can use this field to customize how many overlapping colliders the component should be able to detect. It should be noted that having too large of a value will decrease its performance. In most cases, the default value of 16 suffices.
### :gear: **Additional Size**
> The **Additional Size** determines the distance in units by which collision traces are extended. This extension helps prevent missed overlaps when colliders do not intersect sufficiently. Depending on the scale used in your game you may want to raise or lower this value.
### :gear: **Layers**
> These are the Layers to detect collisions on. This is used when value is not set as **Nothing**.
@@ -0,0 +1,33 @@
---
description: NetworkTrigger2D is used to execute trigger2D events for use with prediction.
---
# NetworkTrigger2D
## Description
This component is used for receiving trigger events for prediction enabled objects for 2D Colliders. It is very much equivalent to a Collider's `OnTriggerEnter`, `OnTriggerExit`, and `OnTriggerStay` messages, except that to receive these you would add this component to your game object and subscribe to its public events.
{% hint style="success" %}
Check out this API page [here](https://fish-networking.com/FishNet/api/api/FishNet.Component.Prediction.NetworkCollider2D.html) for the specific details.
{% endhint %}
## Settings
<div align="left"><figure><img src="../../../../.gitbook/assets/network-trigger-2d-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Maximum Simultaneous Hits**
> This is the maximum number of simultaneous hits that the component will check for. You can use this field to customize how many overlapping colliders the component should be able to detect. It should be noted that having too large of a value will decrease its performance. In most cases, the default value of 16 suffices.
### :gear: **History Duration**
> This determines how long collision history is retained. Lower values optimize memory usage slightly, but may lead to the collision records becoming out of sync on clients with excessively high latency.
### :gear: **Additional Size**
> The **Additional Size** determines the distance in units by which collision traces are extended. This extension helps prevent missed overlaps when colliders do not intersect sufficiently. Depending on the scale used in your game you may want to raise or lower this value.
### :gear: **Layers**
> These are the Layers to detect collisions on. This is used when value is not set as **Nothing**.
@@ -0,0 +1,27 @@
---
description: >-
This component can be used to prevent client side objects from running physics
too quickly due to prediction replays.
---
# OfflineRigidbody
## Description
When using predictions, especially physics prediction, the client will often re-simulate physics to make corrections. You generally want to add an OfflineRigidbody component to prevent non-networked objects from simulating multiple times during a correction.
## Settings
<div align="left"><figure><img src="../../../.gitbook/assets/offline-rigidbody-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Rigidbody Type**
> This is to specify if the offline object uses a rigidbody3d, or 2d.
### :gear: **Get In Children**
> This setting should be enabled if you have child rigidbodies. Keeping this disabled when child rigidbodies are not present will save a very small amount of performance.
## Combining Smoothers
There is a fair chance you will want to have the graphical object on your rigidbodies smoothed between ticks. There are a variety of components to accomplish this; see them on the [tick-smoothers](../tick-smoothers/ "mention") page.
@@ -0,0 +1,26 @@
---
description: >-
The PredictedOwner component allows a user to claim ownership of an object
immediately and be able to use it before the server officially gives the
ownership over.
---
# PredictedOwner
## Description
The **PredictedOwner** allows clients to immediately simulate ownership on an object without waiting for the server's response. This overcomes delays from client latency, allowing for a seamless transition of ownership. Placing this component on an object enables this feature for that network object.
A client can use the [`TakeOwnership`](https://fish-networking.com/FishNet/api/api/FishNet.Component.Ownership.PredictedOwner.html#FishNet_Component_Ownership_PredictedOwner_TakeOwnership_System_Boolean_) method to anticipatorily claim ownership of an object. You can also access the [`PreviousOwner`](https://fish-networking.com/FishNet/api/api/FishNet.Component.Ownership.PredictedOwner.html#FishNet_Component_Ownership_PredictedOwner_PreviousOwner) of the object and by inheriting from this component you can add checks to the server to decide whether to accept the ownership change or reject it. This can be done by overriding the [`OnTakeOwnership`](https://fish-networking.com/FishNet/api/api/FishNet.Component.Ownership.PredictedOwner.html#FishNet_Component_Ownership_PredictedOwner_OnTakeOwnership_FishNet_Connection_NetworkConnection_System_Boolean_) method and not handing over the ownership for whatever reason you may have.
{% hint style="success" %}
Check out its full API page for more specific methods and properties [here](https://fish-networking.com/FishNet/api/api/FishNet.Component.Ownership.PredictedOwner.html).
{% endhint %}
## Settings
<div align="left"><figure><img src="../../../.gitbook/assets/predicted-owner-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Allow Take Ownership**
> This enables or disables the functionality of this component, and can be set at run-time from the server with this method: [`SetAllowTakeOwnership`](https://fish-networking.com/FishNet/api/api/FishNet.Component.Ownership.PredictedOwner.html#FishNet_Component_Ownership_PredictedOwner_SetAllowTakeOwnership_System_Boolean_).
@@ -0,0 +1,35 @@
---
description: >-
The PredictedSpawn component allows you to spawn this Network Object directly
on the client side.
---
# PredictedSpawn
## Description
Adding this component to a [NetworkObject](../../../guides/features/networked-gameobjects-and-scripts/networkobjects/) will allow you to adjust [predicted spawning](../../../guides/features/networked-gameobjects-and-scripts/spawning/predicted-spawning.md) settings for the object. To enable this feature you must also enable predicted spawning within the [ServerManager](../managers/server-manager.md).
The **PredictedSpawn** component allows you to inherit from it and then override any of several available virtual methods to customize and validate predicted spawns.
{% hint style="success" %}
Check out its full API page for the specific methods [here](https://fish-networking.com/FishNet/api/api/FishNet.Component.Ownership.PredictedSpawn.html).
{% endhint %}
## Settings
<div align="left"><figure><img src="../../../.gitbook/assets/predicted-spawn-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Allow Spawning**
> This allows clients to predicted spawn this object. You can change this at run-time with the [`SetAllowSpawning`](https://fish-networking.com/FishNet/api/api/FishNet.Component.Ownership.PredictedSpawn.html#FishNet_Component_Ownership_PredictedSpawn_SetAllowDespawning_System_Boolean_) method. Just be sure to do so on the client and server side.
### :gear: **Allow Despawning**
> This allows clients to predicted despawn this object. You can change this at run-time with the [`SetAllowDespawning`](https://fish-networking.com/FishNet/api/api/FishNet.Component.Ownership.PredictedSpawn.html#FishNet_Component_Ownership_PredictedSpawn_SetAllowDespawning_System_Boolean_) method. Just be sure to do so on the client and server side.
{% hint style="info" %}
You can implement WritePayload and ReadPayload in your classes which inherit NetworkBehaviour to send data with spawn messages. This can even be used for predicted spawns to the server, and clients!
Learn more about that here: [spawn-payloads.md](../../../guides/features/networked-gameobjects-and-scripts/spawning/spawn-payloads.md "mention")
{% endhint %}
@@ -0,0 +1,27 @@
---
description: >-
An easy tool to assist with spawning specific objects as soon as the server
starts.
---
# ServerSpawner
## Description <a href="#server-and-host" id="server-and-host"></a>
The **ServerSpawner** component is a helpful tool that you can use for optionally instantiating and spawning objects as soon as the FishNet server successfully starts running (or on your own command if preferred). This is very often used to instantiate [Global Network Objects](#user-content-fn-1)[^1], which need to be instantiated at run-time instead of existing inside a scene directly.
## Settings <a href="#server-and-host" id="server-and-host"></a>
<div align="left"><figure><img src="../../.gitbook/assets/server-spawner-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Automatically Spawn**
> This dictates whether the component will instantiate and spawn the objects as soon as the server starts, or only after you manually call `Spawn` on the **ServerSpawner** component.
>
> You can disable this if you want to manually control when these objects are spawned.
### :gear: **Network Objects**
> This is a list of the Network Objects the component will instantiate once the server starts. The order of this list is respected when instantiating the objects, and the component will attempt to use [FishNet's object pooling](../../guides/features/networked-gameobjects-and-scripts/spawning/object-pooling.md) for the objects if they are added to the an object pool.
[^1]: These are NetworkObjects that are added to the DontDestroyOnLoad scene and visible to all clients.
@@ -0,0 +1,16 @@
---
description: >-
These components smooths a child graphical object over frames between each
network tick. These are useful for prediction and smoothing graphics on larger
physics steps.
---
# Tick Smoothers
You may put multiple tick smoother components beneath an object if you have several different graphical pieces in your hierarchy you want smoothed. A good example of this is a vehicle where the wheels move independently of the vehicle body.
The smoother will be placed on the graphical object you wish to smooth; this object must not be the same as the target, nor higher in the hierarchy of the target; being a child of the target is fine.
{% hint style="success" %}
Tick Smoothers are only used by clients. These components will not function when only the server is started.
{% endhint %}
@@ -0,0 +1,8 @@
---
description: >-
This component is primarily used for smooth camera movement between ticks. It
can be used with prediction or normal design.
---
# DetachableNetworkTickSmoother \[Obsolete]
@@ -0,0 +1,8 @@
---
description: >-
MonoTickSmoother smooths a child graphical object over frames between each
network tick. This component can be used on non-networked objects.
---
# MonoTickSmoother \[Obsolete]
@@ -0,0 +1,65 @@
---
description: >-
The Network Tick Smoother component ensures smooth and visually consistent
movement of networked objects by interpolating their positions, rotations, and
scale between network updates.
---
# NetworkTickSmoother
## Description
The **Network Tick Smoother** is responsible for smoothing an object's transformation properties between network ticks. Its main purpose is to make movement, rotation, and scale, transitions appear fluid, even though network updates may arrive in discrete steps. The **NetworkTickSmoother** initializes its settings using [NetworkBehaviour callbacks](../../../guides/features/networked-gameobjects-and-scripts/network-behaviour-guides.md#callbacks), and may only be placed below a [NetworkObject](../network-object.md); if you need this form of smoothing for objects that aren't NetworkObjects you can use the [offlineticksmoother.md](offlineticksmoother.md "mention") instead.
There are several public APIs available for changing the smoother settings at runtime. An example of some are changing adaptive interpolation type, interpolation value, teleporting the smoothed object, and more.
{% hint style="success" %}
Please review our [API ](https://fish-networking.com/FishNet/api/api/FishNet.Component.Transforming.NetworkTickSmoother.html)for all runtime settings.
{% endhint %}
## Settings
<div align="left"><figure><img src="../../../.gitbook/assets/network-tick-smoother-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: Initialization Settings
> These are essential to the component working.
>
> * **Target Transform** is the transform you want to follow. This is commonly the root NetworkObject but may be other nested NetworkBehaviours when using multiple smoothers beneath a single NetworkObject.
> * **Detach On Start** when true will unparent the object which the smoother is attached, placing it as root in world space. Detach is commonly used when the smoothed object is a camera target, given cameras do not handle rollback or larger tick steps well.
> * **Attach On Stop** when true will reparent the graphical object when the network stop callbacks occur on the object, as detach will unparent on network start callbacks. Typically you want to reattach graphical objects. If the Target Transform is destroyed while detached the object the smoother is attached to will also destroy itself.
### :gear: **Controller**
> The **Controller** settings determine how the object is smoothed for the controller of the object, which is either the owner or if the object has no owner then it is the server.
>
> * **Enable Teleport** will allow the graphical object to teleport to it's actual position – also known as the root position – if the position changes are drastic. Ideally you will not need this setting, but it's an available option should you desire to use it.
> * **Teleport Threshold** is shown while teleporting is enabled. If the graphical object's position is this many units away from the actual position, then the graphical object will teleport to the actual position.
> * **Adaptive Interpolation,** when not disabled, will increase the interpolation amount as the local client's latency becomes higher. Low settings of adaptive interpolation will increase the interpolation at lower amounts, while high will increases the interpolation more. When Adaptive Interpolation is disabled, a flat amount of interpolation will used at all times.\
> \
> Flat interpolation is often used in competitive or reaction based games to keep the interpolation consistent for all players. Flat interpolation is also necessary for accurate collider rollback, given our [collider rollback system](../../../guides/features/lag-compensation/) needs to know the amount of interpolation a client sees to provide accurate raycast hit results.\
> \
> Adaptive interpolation is best used with casual games where you want the absolute smoothed experiences regardless of local client latency.
> * **Interpolation Value** is displayed when Adaptive Interpolation is off. This is a flat amount of interpolation that does not increase when the local client's latency does.
> * **Smoothed Properties** determines which properties of the transform will be smoothed. If smoothing is not set for a specific property, then that particular value will persist in the same world space at all times. For example, if you uncheck Position from Smoothed Properties and move the root, the object which this component sits will never move in space, unless you of course move it manually.
### :gear: Spectator Smoothing
> The **Spectator Smoothing** settings determine how the object is smoothed for client's that are **not** the owner.
>
> * **Favor Prediction Network Transform** prevents jitter by automatically disabling the NetworkTickSmoother when a predicted NetworkObject is under the active control of a NetworkTransform. If a specific transform is assigned in the prediction field, the smoother will yield control to the NetworkTransform’s internal smoothing logic; otherwise, the smoother remains active to handle state interpolation.
> * **Enable Teleport** will allow the graphical object to teleport to it's actual position – also known as the root position – if the position changes are drastic. Ideally you will not need this setting, but it's an available option should you desire to use it.
> * **Teleport Threshold** is shown while teleporting is enabled. If the graphical object's position is this many units away from the actual position, then the graphical object will teleport to the actual position.
> * **Adaptive Interpolation,** when not disabled, will increase the interpolation amount as the local client's latency becomes higher. Low settings of adaptive interpolation will increase the interpolation at lower amounts, while high will increases the interpolation more. When Adaptive Interpolation is disabled, a flat amount of interpolation will used at all times.\
> \
> Flat interpolation is often used in competitive or reaction based games to keep the interpolation consistent for all players. Flat interpolation is also necessary for accurate collider rollback, given our [collider rollback system](../../../guides/features/lag-compensation/) needs to know the amount of interpolation a client sees to provide accurate raycast hit results.\
> \
> Adaptive interpolation is best used with casual games where you want the absolute smoothed experiences regardless of local client latency.
> * **Interpolation Value** is displayed when Adaptive Interpolation is off. This is a flat amount of interpolation that does not increase when the local client's latency does.
> * **Smoothed Properties** determines which properties of the transform will be smoothed. If smoothing is not set for a specific property then that particular value will persist in the same world space at all times. For example, if you uncheck Position from Smoothed Properties and move the root, the object which this component sits will never move in space, unless you of course move it manually.
## Scale Smoothing
Scale behaves a little differently when smoothed. Since nested objects use a localScale they will not change with the parent scale, and thus cannot be easily interpolated.
If you wish to smooth scale transitions then **Detach** (and optionally **Reattach**) must be enabled in the initialization settings so that the smoothed object does not have it's global (lossy) scale modified by Unity when the target transform or any higher transform has it's scale changed.
@@ -0,0 +1,52 @@
---
description: >-
The Offline Tick Smoother component ensures smooth and visually consistent
movement of non-networked objects by interpolating their positions, rotations,
and scale between network updates.
---
# OfflineTickSmoother
## Description
The OfflineTickSmoother behaves just like the [networkticksmoother.md](networkticksmoother.md "mention"), except it initializes it's settings using the [InstanceFinder](../../../guides/features/instancefinder-guides.md) and can thus be placed beneath objects which are not networked. It is responsible for smoothing an offline object's transformation properties between network ticks.
There are several public APIs available for changing the smoother settings at runtime. An example of some are changing adaptive interpolation type, interpolation value, teleporting the smoothed object, and more.
{% hint style="success" %}
Please review our [API ](https://fish-networking.com/FishNet/api/api/FishNet.Component.Transforming.NetworkTickSmoother.html)for all runtime settings.
{% endhint %}
## Settings
<div align="left"><figure><img src="../../../.gitbook/assets/offline-tick-smoother-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Automatically Initialize**
> This option will configure this smoother in Awake using the [InstanceFinder](../../../guides/features/instancefinder-guides.md) to listen to network callbacks. When false, you must manually call the `Initialize` method on this component.
### :gear: Initialization Settings
> These are essential to the component working.
>
> * **Target Transform** is the transform you want to follow. This is commonly the root [NetworkObject](../../../guides/features/networked-gameobjects-and-scripts/networkobjects/) but may be other nested NetworkBehaviours when using multiple smoothers beneath a single NetworkObject.
> * **Detach On Start** when true will unparent the object which the smoother is attached, placing it as root in world space. Detach is commonly used when the smoothed object is a camera target, given cameras do not handle rollback or larger tick steps well.
> * **Attach On Stop** when true will reparent the graphical object when the network stop callbacks occur on the object, as detach will unparent on network start callbacks. Typically you want to reattach graphical objects. If the Target Transform is destroyed while detached the object the smoother is attached to will also destroy itself.
### :gear: Smoothing
> The **Smoothing** settings determine how the object is smoothed.
>
> * **Enable Teleport** will allow the graphical object to teleport to it's actual position – also known as the root position – if the position changes are drastic. Ideally you will not need this setting, but it's an available option should you desire to use it.
> * **Teleport Threshold** is shown while teleporting is enabled. If the graphical object's position is this many units away from the actual position, then the graphical object will teleport to the actual position.
> * **Adaptive Interpolation,** when not disabled, will increase the interpolation amount as the local client's latency becomes higher. Low settings of adaptive interpolation will increase the interpolation at lower amounts, while high will increases the interpolation more. When Adaptive Interpolation is disabled, a flat amount of interpolation will used at all times.\
> \
> Flat interpolation is often used in competitive or reaction based games to keep the interpolation consistent for all players. Flat interpolation is also necessary for accurate collider rollback, given our [collider rollback system](../../../guides/features/lag-compensation/) needs to know the amount of interpolation a client sees to provide accurate raycast hit results.\
> \
> Adaptive interpolation is best used with casual games where you want the absolute smoothed experiences regardless of local client latency.
> * **Interpolation Value** is displayed when Adaptive Interpolation is off. This is a flat amount of interpolation that does not increase when the local client's latency does.
> * **Smoothed Properties** determines which properties of the transform will be smoothed. If smoothing is not set for a specific property then that particular value will persist in the same world space at all times. For example, if you uncheck Position from Smoothed Properties and move the root, the object which this component sits will never move in space, unless you of course move it manually.
{% hint style="info" %}
Since a non-networked object cannot be owned there is only one set of smoothing settings, compared to NetworkTickSmoother which can have unique settings if Owner or Spectator.
{% endhint %}
@@ -0,0 +1,8 @@
---
description: >-
There are multiple commonly needed helper or debugging components that come
with Fish-Networking.
---
# Utilities
@@ -0,0 +1,9 @@
---
description: >-
Authenticators are an additional layer of security. A client must pass the
authenticator in order to communicate with the game server.
---
# Authenticator
Authenticator logic can be fully customized by inheriting from the _**Authenticator**_ script, and placing your created authenticator within the [Server Manager component](../managers/server-manager.md). There are a few example authenticators that come installed with the FishNet package within the `FishNet/Demos/Authenticator/Scripts` directory.
@@ -0,0 +1,37 @@
---
description: >-
The BandwidthDisplay component is a simple development GUI to show the
bandwidth ingress and egress.
---
# BandwidthDisplay
## Description
Using this component in combination with the [Statistics Manager](../managers/statisticsmanager.md) will show bandwidth being used by Fish-Networking.
<div align="left"><figure><img src="../../../.gitbook/assets/bandwidth-display-example.png" alt="Image showing the current bandwidth being used at the top right of a screen in a game."><figcaption><p>Example of the BandwidthDisplay being used</p></figcaption></figure></div>
## Settings
<div align="left"><figure><img src="../../../.gitbook/assets/bandwidth-display-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Color**
> This is which color to display results as.
### :gear: **Placement**
> The **Placement** is in what part of the screen to display results.
### :gear: **Seconds Averaged**
> This is for the number of seconds used to gather data. Lower values will show more up to date usage per second while higher values provide a better over-all estimate.
### :gear: **Show Outgoing**
> When enabled, this will display the bandwidth used from data being sent. This can be changed at runtime with the [`SetShowOutgoing`](https://fish-networking.com/FishNet/api/api/FishNet.Component.Utility.BandwidthDisplay.html#FishNet_Component_Utility_BandwidthDisplay_SetShowOutgoing_System_Boolean_) method.
### :gear: **Show Incoming**
> When enabled, this will display the bandwidth used from data being received. This can be changed at runtime with the [`SetShowIncoming`](https://fish-networking.com/FishNet/api/api/FishNet.Component.Utility.BandwidthDisplay.html#FishNet_Component_Utility_BandwidthDisplay_SetShowIncoming_System_Boolean_) method.
@@ -0,0 +1,43 @@
---
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](../managers/network-manager.md).
{% hint style="success" %}
Check out the API page for specific methods [here](https://fish-networking.com/FishNet/api/api/FishNet.Component.Scenes.DefaultScene.html).
{% 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
<div align="left"><figure><img src="../../../.gitbook/assets/default-scene-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **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](../../../guides/features/scene-management/loading-scenes/).
### :gear: **Start In Offline**
> This will load the server and clients into the offline scene when the game starts.
### :gear: **Offline Scene**
> This is the scene to load when offline.
### :gear: **Online Scene**
> This is the scene to load when online.
### :gear: **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](../../../guides/features/scene-management/loading-scenes/).
@@ -0,0 +1,29 @@
---
description: >-
The PingDisplay can be used to easily display the client's network ping during
development.
---
# PingDisplay
## Description
Often times you may want to display the local client's ping while developing your game, this can easily be done with the **PingDisplay** component. This component is commonly added to the [NetworkManager](../managers/network-manager.md) object, but that is not a requirement.
<div align="left"><figure><img src="../../../.gitbook/assets/ping-display-example.png" alt="An image of a game with a text at the top right showing the client&#x27;s ping"><figcaption><p>Example of the PingDisplay component in-use</p></figcaption></figure></div>
## Settings
<div align="left"><figure><img src="../../../.gitbook/assets/ping-display-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Color**
> This is which color to use for the displayed text.
### :gear: **Placement**
> The P**lacement** indicates in which part of the screen to display the client's ping.
### :gear: **Hide Tick Rate**
> This option will remove tick rate latency from the ping results otherwise the displayed ping will include the delay caused by the server's tick rate.
@@ -0,0 +1,96 @@
---
description: Information about FishNet's additional configuration and editor tools.
---
# Configuration and Tools
FishNet comes with some useful settings and editor tools to be used with it; these can be accessed through the (**Tools → Fish-Networking**) toolbar menu.
<div align="left"><figure><img src="../.gitbook/assets/toolbar-menu.png" alt=""><figcaption></figcaption></figure></div>
***
## Beta
The settings here will vary depending on your FishNet version and will enable you to activate and deactivate the latest beta features. This can be helpful if you want to stay with the most tested code for you project or if alternatively if you want to try out features that are coming out soon.
***
## Utility
### Quality of Life Attributes
With this option you will be able to disable and enable certain attributes FishNet uses. It's not recommended to use this unless a developer or community helper advises you do so for debugging purposes.
### Upgrading From Mirror
When converting a project from Mirror Networking, it can be helpful to use these tools.
#### Replace Components
This tool helps you replace common Mirror components with what FishNet may use instead.
#### Remove Defines
This tool removes the many scripting defines that Mirror includes in your Unity project.
### Refresh Default Prefabs
This option will cause FishNet's [Default Prefab Objects](scriptableobjects/spawnableprefabs/defaultprefabobjects.md) tool to be refreshed by searching your project and keeping track of the Network Object Prefabs within it. This is done automatically for you, but you may want to trigger it if you start seeing the wrong prefabs being spawned in a client build or editor.
### Reserialize NetworkObjects
This tool allows you to reserialize prefabs and scenes. Most often you will use this if you get an error message by FishNet telling you to do so. It can also help you if you are running into errors reporting missing sceneids.
{% hint style="info" %}
If you run it on the open scenes, be sure to save them after it runs.
{% endhint %}
<div align="left"><figure><img src="../.gitbook/assets/reserialize-objects-menu.png" alt=""><figcaption></figcaption></figure></div>
***
## Configuration
The FishNet configuration (available in the Project Settings) has options for FishNet Pro's **Code Stripping** feature as well as the Prefab Objects Generator and NetworkBehaviour Template.
<div align="left"><figure><img src="../.gitbook/assets/fishnet-configuration.png" alt=""><figcaption></figcaption></figure></div>
#### Code Stripping
FishNet Pro allows you to strip server-only code from [non-server builds](#user-content-fn-1)[^1], this includes the code inside [ServerRpcs](../guides/features/network-communication/remote-procedure-calls.md#serverrpc), [Server](../guides/features/server-and-client-identification/executing-on-server-or-client.md#server-attribute) marked methods, and server specific callbacks such as [OnStartServer](../guides/features/networked-gameobjects-and-scripts/network-behaviour-guides.md#onstartserver) and [OnSpawnServer](../guides/features/networked-gameobjects-and-scripts/network-behaviour-guides.md#onspawnserver). You can use one of the two available methods for this, either **redirection** or **emptying.**
#### New NetworkBehaviour Template
This allows you to customize the NetworkBehaviour asset template as well as choose a new location for it. If you want to create a NetworkBehaviour using this template, simply go to **Assets → FishNet → NetworkBehaviour Script.**
#### Prefab Objects Generator
The Prefab Objects Generator is used by the [Default Prefab Objects](scriptableobjects/spawnableprefabs/defaultprefabobjects.md) search your project and keep track of the Network Object Prefabs within it. You can enable and disable it as well as enable and disable its logging.
The **Full Rebuild** option will tell FishNet to search all prefabs instead of just ones that were recently modified.
**Spawnable Only** instructs the generator to only find NetworkObject prefabs that have [IsSpawnable](https://fish-networking.com/FishNet/api/api/FishNet.Object.NetworkObject.html#FishNet_Object_NetworkObject_IsSpawnable) enabled.
The **Default Prefab Objects Path** option allows you to change the default path of the asset in your Unity project.
Finally, you can set the search scope to either **Entire Project** or **Specific Folders**:
* **Entire Project**: Searches all prefabs, with the option to exclude certain folders.
* **Specific Folders**: Lets you choose exactly which folders to search.
{% hint style="info" %}
To include sub-folders, append an asterisk (`*`) to the path.
{% endhint %}
<div align="left"><figure><img src="../.gitbook/assets/prefab-objects-generator.png" alt=""><figcaption></figcaption></figure></div>
***
## Getting Started
The getting started option will show FishNet's **Getting Started** menu, giving you quick access to relevant FishNet links, including the Documentation, Discord, GitHub, and more.
<div align="left"><figure><img src="../.gitbook/assets/getting-started-editor.png" alt=""><figcaption></figcaption></figure></div>
[^1]: Regular build profiles that aren't headless/dedicated server
@@ -0,0 +1,9 @@
---
description: >-
Prefabs are reusable GameObject assets containing components, property values,
and child GameObjects.
---
# Prefabs
FishNet has some helpful prefabs that can make development and testing quicker. They are located inside the `/FishNet/Demos/Prefabs` directory and can be dragged directly into your scene to be made use of.
@@ -0,0 +1,18 @@
---
description: >-
A basic HUD for starting and stopping the client and server, useful for
development.
---
# NetworkHudCanvas
The NetworkHudCanvas prefab can be used to show a simple Heads-Up Display in your game allowing you to quickly start and stop the FishNet server and client.
It also allows you to set an **Auto Start Type**, which will dictate how FishNet behaves as soon as the object is loaded in the game.
<figure><img src="../../.gitbook/assets/setting-autostart-type.png" alt=""><figcaption><p>Setting the <strong>Auto Start Type</strong> to <strong>Host</strong></p></figcaption></figure>
{% hint style="info" %}
This object is most commonly used for debugging and development.
{% endhint %}
@@ -0,0 +1,13 @@
---
description: A pre-configured NetworkManager prefab, for ease-of-use.
---
# NetworkManager
The NetworkManager prefab contains a basic [NetworkManager](../components/managers/network-manager.md) with a [NetworkHudCanvas](networkhudcanvas.md) to provide you with a quick setup for using FishNet in your game.
You can simply add this object into your scene and use the **Server** and **Client** buttons in play mode to start FishNet as a server, client, or both. You can also setup the [autostart options ](#user-content-fn-1)[^1]on the NetworkHudCanvas child object.
The components this object contains are the NetworkManager, [ObserverManager ](../components/managers/observermanager/)(with a [Scene Observer Condition](../scriptableobjects/observerconditions/scenecondition.md)), and the PlayerSpawner.
[^1]: Autostart options allow FishNet to begin as a client, server, both, or none as soon as the object is loaded in the game.
@@ -0,0 +1,9 @@
---
description: Scriptable Objects utilized by FishNet for configuration.
---
# ScriptableObjects
Fish-Networking includes quite a few [ScriptableObjects ](https://docs.unity3d.com/Manual/class-ScriptableObject.html)that you can use to customize the behavior of specific features. There are default ones included with FishNet, but you can also create your own from the _**Assets → Create → FishNet**_ toolbar menu.
<figure><img src="../../.gitbook/assets/fishnet-asset-create-menu.png" alt="Image showing FishNet assets creation menu"><figcaption><p>Create FishNet asset menu</p></figcaption></figure>
@@ -0,0 +1,43 @@
---
description: >-
The scriptable object that allows you to customize what FishNet will output
logs of.
---
# LevelLoggingConfiguration
## Description <a href="#server-and-host" id="server-and-host"></a>
The **Level Logging Configuration** scriptable object simply allows you to customize Fish-Networking's logging. Once created, it can be selected on the [NetworkManager](../components/managers/network-manager.md) component. There are four logging levels available for the various build and editor types. **Off** will permit no logs, **Error** will only permit direct error logs, **Warning** will allow error and warning logs, and **Common** will allow all logging, including errors, warnings, and informational logs.
## Settings <a href="#server-and-host" id="server-and-host"></a>
<figure><img src="../../.gitbook/assets/level-logging-configuration.png" alt=""><figcaption><p>Default settings</p></figcaption></figure>
### :gear: **Is Enabled**
> This is simply a toggle to enable and disable all of Fish-Networking's logs.
### :gear: Add Local Tick
> This option allows you to prepend the network's local tick when log was made onto the log message. This can be quite handy for precise debugging.
### :gear: **Add Timestamps**
> This allows you to prepend to all logs the local date and time when the log was made.
### :gear: Enable Timestamps In Editor
> Since Unity's console already includes the time that logs are sent at, it can be handy to hide FishNet's Timestamps in the editor and only display them in builds.
### :gear: **Development Logging**
> This controls the level of logs sent while the game is a development build or editor.
### :gear: **GUI Logging**
> This controls the level of logging to use when the game is built regularly, as opposed to a headless (non GUI) build.
### :gear: **Headless Logging**
> This controls the logging level for headless game builds.
@@ -0,0 +1,3 @@
# ObserverConditions
**ObserverConditions** in Fish-Networking define specific conditions under which clients receive updates about a [NetworkObject's](../../../guides/features/networked-gameobjects-and-scripts/networkobjects/) state. These conditions help optimize network traffic by ensuring that only relevant updates are transmitted, as well as prevent client's from cheating by only sending relevant data to individual clients.
@@ -0,0 +1,31 @@
# DistanceCondition
## Description <a href="#server-and-host" id="server-and-host"></a>
The **Distance Condition** ensures that an object is only observed if it is at least a specified minimum distance away from all objects owned by a client. The Distance Condition is a [Timed Condition](#user-content-fn-1)[^1].
<div align="left"><figure><img src="../../../.gitbook/assets/distance-observer-condition.svg" alt="" width="563"><figcaption></figcaption></figure></div>
## Settings <a href="#server-and-host" id="server-and-host"></a>
<div align="left"><figure><img src="../../../.gitbook/assets/distance-observer-condition.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Add Order**
> This controls the order in which this observer condition will be evaluated on an object.
>
> This can be very useful when having observer conditions that are more computationally complex than others, as it allows you to choose the order in which they will be evaluated. Timed conditions are always evaluated after non-timed conditions.
### :gear: **Is Constant**
> Is used to declare whether the condition's settings or data will remain unchanged at runtime. Its purpose is to optimize performance by avoiding unnecessary updates or recalculations for conditions that do not change during execution. It is currently not implemented, but is available for future use and can already be set.
### :gear: **Maximum Distance**
> The maximum distance that any object owned by a client must be within an object to observe it. If all of the client's owned [NetworkObjects](../../../guides/features/networked-gameobjects-and-scripts/networkobjects/) are farther than this distance, the object will not be visible to them.
### :gear: **Hide Distance Percent**
> **This** determines an additional buffer zone beyond the maximum distance before an object is hidden. The purpose of the "Hide Distance Percent" is to prevent objects from flickering in and out of visibility when a client is near the maximum distance threshold. It creates a smoother transition for hiding objects by adding a percentage-based distance buffer. As an example, if the **Maximum Distance** is set to `100f` and the **Hide Distance Percent** is `0.5` (50%), the object will remain visible until the client is `150f` units away. This ensures objects do not disappear immediately as they cross the initial visibility boundary.
[^1]: A Timed Condition is evaluated periodically rather than only when certain conditions change.
@@ -0,0 +1,23 @@
# GridCondition
## Description <a href="#server-and-host" id="server-and-host"></a>
The **Grid Condition** is similar to the [DistanceCondition](distancecondition.md) and evaluates to true if clients are within specified distance of the object. The Grid Condition is however less accurate but more performant; it is also a [Timed Condition](#user-content-fn-1)[^1]. This condition requires you to place a [HashGrid ](../../components/managers/observermanager/hashgrid.md)on or beneath your [NetworkManager](../../components/managers/network-manager.md) object.
<div align="left"><figure><img src="../../../.gitbook/assets/grid-observer-condition.svg" alt="" width="443"><figcaption></figcaption></figure></div>
## Settings <a href="#server-and-host" id="server-and-host"></a>
<div align="left"><figure><img src="../../../.gitbook/assets/grid-observer-condition.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Add Order**
> This controls the order in which this observer condition will be evaluated on an object.
>
> This can be very useful when having observer conditions that are more computationally complex than others, as it allows you to choose the order in which they will be evaluated. Timed conditions are always evaluated after non-timed conditions.
### :gear: **Is Constant**
> Is used to declare whether the condition's settings or data will remain unchanged at runtime. Its purpose is to optimize performance by avoiding unnecessary updates or recalculations for conditions that do not change during execution. It is currently not implemented, but is available for future use and can already be set.
[^1]: A Timed Condition is evaluated periodically rather than only when certain conditions change.
@@ -0,0 +1,21 @@
# HostOnlyCondition
## Description <a href="#server-and-host" id="server-and-host"></a>
The **Host Only Condition** evaluates to true when the player is a client host. Any connection which is not client host will fail this evaluation. You can use this observer condition to only show objects to the host player, either permanently or temporarily. This condition is not a timed condition.
<div align="left"><figure><img src="../../../.gitbook/assets/host-only-observer-condition.svg" alt="" width="419"><figcaption></figcaption></figure></div>
## Settings <a href="#server-and-host" id="server-and-host"></a>
<div align="left"><figure><img src="../../../.gitbook/assets/host-only-observer-condition.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Add Order**
> This controls the order in which this observer condition will be evaluated on an object.
>
> This can be very useful when having observer conditions that are more computationally complex than others, as it allows you to choose the order in which they will be evaluated. Timed conditions are always evaluated after non-timed conditions.
### :gear: **Is Constant**
> Is used to declare whether the condition's settings or data will remain unchanged at runtime. Its purpose is to optimize performance by avoiding unnecessary updates or recalculations for conditions that do not change during execution. It is currently not implemented, but is available for future use and can already be set.
@@ -0,0 +1,23 @@
# MatchCondition
## Description <a href="#server-and-host" id="server-and-host"></a>
The **Match Condition** evaluates to true when players or objects share the same match[^1]. Both owned and non-owned objects can be added to matches. Objects or players not added to matches will have their data synchronized with everyone, unless prevented by another condition. See the [MatchCondition api](https://fish-networking.com/FishNet/api/api/FishNet.Component.Observing.MatchCondition.html) for more information on usage. This condition is not a timed condition.
<div align="left"><figure><img src="../../../.gitbook/assets/match-observer-condition.svg" alt="" width="466"><figcaption></figcaption></figure></div>
## Settings <a href="#server-and-host" id="server-and-host"></a>
<div align="left" data-full-width="false"><figure><img src="../../../.gitbook/assets/match-observer-condition.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Add Order**
> This controls the order in which this observer condition will be evaluated on an object.
>
> This can be very useful when having observer conditions that are more computationally complex than others, as it allows you to choose the order in which they will be evaluated. Timed conditions are always evaluated after non-timed conditions.
### :gear: **Is Constant**
> Is used to declare whether the condition's settings or data will remain unchanged at runtime. Its purpose is to optimize performance by avoiding unnecessary updates or recalculations for conditions that do not change during execution. It is currently not implemented, but is available for future use and can already be set.
[^1]: A _match_ can mean a lot of different things, but in this case it is basically a custom tag you can give objects and players to separate them from observing one another.
@@ -0,0 +1,21 @@
# OwnerOnlyCondition
## Description <a href="#server-and-host" id="server-and-host"></a>
The **Owner Only Condition** evaluates to true when a player owns the object. An owner condition will make an object only visible to its owner. If there is no owner, the object will not be visible to any clients. This can be very useful for sharing information with only the owner client, for example inventory data or a player's hand of cards, which shouldn't be shared with other clients to prevent cheating and wasted bandwidth.
<div align="left"><figure><img src="../../../.gitbook/assets/owner-only-observer-condition.svg" alt="" width="469"><figcaption></figcaption></figure></div>
## Settings <a href="#server-and-host" id="server-and-host"></a>
<div align="left"><figure><img src="../../../.gitbook/assets/owner-only-observer-condition.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Add Order**
> This controls the order in which this observer condition will be evaluated on an object.
>
> This can be very useful when having observer conditions that are more computationally complex than others, as it allows you to choose the order in which they will be evaluated. Timed conditions are always evaluated after non-timed conditions.
### :gear: **Is Constant**
> Is used to declare whether the condition's settings or data will remain unchanged at runtime. Its purpose is to optimize performance by avoiding unnecessary updates or recalculations for conditions that do not change during execution. It is currently not implemented, but is available for future use and can already be set.
@@ -0,0 +1,21 @@
# SceneCondition
## Description <a href="#server-and-host" id="server-and-host"></a>
The **Scene Condition** evaluates to true if the client shares any scenes with the object. This is arguably the most important observer condition, and it is the only one that is added by default to the [example NetworkManager prefab](../../prefabs/networkmanager.md). This condition is important because it helps avoid serious de-syncs that would happen if the server tried to tell clients about objects from a scene they haven't yet loaded.
<div align="left"><figure><img src="../../../.gitbook/assets/scene-observer-condition.svg" alt="" width="457"><figcaption></figcaption></figure></div>
## Settings <a href="#server-and-host" id="server-and-host"></a>
<div align="left"><figure><img src="../../../.gitbook/assets/scene-observer-condition.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Add Order**
> This controls the order in which this observer condition will be evaluated on an object.
>
> This can be very useful when having observer conditions that are more computationally complex than others, as it allows you to choose the order in which they will be evaluated. Timed conditions are always evaluated after non-timed conditions.
### :gear: **Is Constant**
> Is used to declare whether the condition's settings or data will remain unchanged at runtime. Its purpose is to optimize performance by avoiding unnecessary updates or recalculations for conditions that do not change during execution. It is currently not implemented, but is available for future use and can already be set.
@@ -0,0 +1,11 @@
# SpawnablePrefabs
Fish-Networking uses a collection of prefabs to manage spawning of network objects across the network. Whenever you instantiate and [spawn](../../../guides/features/networked-gameobjects-and-scripts/spawning/) an object on the server, FishNet will use the selected **Spawnable Prefabs** collection to find which object it is and to automatically instantiate and link the objects on all clients.
The **Spawnable Prefabs** collection can be set on your [NetworkManager](../../components/managers/network-manager.md) component.
{% hint style="success" %}
The NetworkManager will automatically set the **Spawnable Prefabs** to an automatically managed [DefaultPrefabObjects ](defaultprefabobjects.md)asset if a custom one is not selected.
{% endhint %}
<figure><img src="../../../.gitbook/assets/network-manager-spawnable-prefabs.png" alt="NetworkManager component highlighting Spawnable Prefabs field"><figcaption><p>The <strong>Spawnable Prefabs</strong> field on the NetworkManager</p></figcaption></figure>
@@ -0,0 +1,9 @@
# DefaultPrefabObjects
The **Default Prefab Objects** asset is a dynamically populated collection of spawnable network objects. FishNet automatically generates it in the designated directory specified in your Fish-Networking configuration, filling it with networked prefabs from the configured locations.
{% hint style="info" %}
You do not need to manually populate or update this collection, FishNet will take care of it automatically.
{% endhint %}
<figure><img src="../../../.gitbook/assets/default-prefab-objects.png" alt=""><figcaption><p>Example of <strong>DefaultPrefabObjects</strong> being populated by Networked Prefabs</p></figcaption></figure>
@@ -0,0 +1,9 @@
# DualPrefabObjects
The Dual Prefab Objects asset can be used to have Fish-Networking spawn a different prefab on the clients as it uses on the server. Whenever you spawn the server selected version, FishNet will spawn the client version on all clients.
{% hint style="success" %}
You can select the same prefab in both the Server and Client fields to have the same one spawned on all clients as the server.
{% endhint %}
<figure><img src="../../../.gitbook/assets/dual-prefab-objects.png" alt=""><figcaption><p>Example of a <strong>Dual Prefab Objects</strong> asset being populated</p></figcaption></figure>
@@ -0,0 +1,5 @@
# SinglePrefabObjects
The **Single Prefab Objects** is a scriptable object which you can inherit from for custom functionality. It is used by the DefaultPrefabObjects collection and can also be directly used for your own collections. If using it directly, remember to manually add all your spawnable network object prefabs into its collection.
<figure><img src="../../../.gitbook/assets/single-spawnable-prefabs.png" alt="screenshot of a single prefab objects asset being filled in"><figcaption><p>A <strong>single prefab objects</strong> asset being manually populated</p></figcaption></figure>
@@ -0,0 +1,23 @@
---
description: Transports control how data is sent, received, and handled over the network.
---
# Transports
The **Transport** is the low-level layer responsible for sending and receiving raw data over the network. It abstracts away the details of TCP/UDP sockets and handles packet delivery, reliability, ordering, etc. FishNet uses events internally to plug into transport messages. Although it be unlikely you would need to access such messages, they are available to you for your development as well.
There are many transports available, some are maintained by the Fish-Networking team and others maintained by the community.
{% hint style="success" %}
[Tugboat](tugboat.md) is the default transport and will be added to your project at runtime. If you wish to use a different transport or customize **Tugboat** you must add the component to your [NetworkManager](../components/managers/network-manager.md) object.
{% endhint %}
## Switching transports at run-time or using multiple transports
FishNet has support for changing transports on your NetworkManager while the network is not running as well as allowing servers to utilize multiple transports at once. For example you may want to use FishyEOS or Unity Transport to support your console users, but also use Tugboat to give a better experience to your Non-Console users.
FishNet uses the Multipass transport to achieve both of these goals.
{% hint style="info" %}
Even with **Multipass**, clients can only ever utilize one active **transport**. More info can be found on the [Component](multipass.md) and [Guide](../../guides/features/transports/multipass.md) pages.
{% endhint %}
@@ -0,0 +1,63 @@
---
description: >-
Bayou is a WebGL transport, evolved from SimpleWebTransport, built for
seamless browser communication.
---
# Bayou
## Description
Bayou is the transport you are looking for when you want communication on WebGL.\
\
It is an updated and repurposed version of the "SimpleWebTransport" that was originally designed for Mirror Networking.
***
## Compatibility
<table data-full-width="false" data-search="false"><thead><tr><th width="149">System</th><th width="198">Supported?</th></tr></thead><tbody><tr><td>Windows</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>MacOS</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>Linux</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>Web</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>IOS</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>Android</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>Xbox</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>PlayStation</td><td><mark style="color:red;">Not Supported</mark></td></tr><tr><td>Nintendo</td><td><mark style="color:red;">Not Supported</mark></td></tr></tbody></table>
***
## How to install
Bayou does not come with FishNet by default; you must download it from GitHub.\
You can find the latest version at the link below!
[https://github.com/FirstGearGames/Bayou/releases](https://github.com/FirstGearGames/Bayou/)\
\
Once downloaded and imported into Unity alongside FishNet. You should add the component to your network manager, and assign the **Transport** field on the **Transport Manager** to the Bayou component.
***
## Settings
<div align="left"><figure><img src="../../.gitbook/assets/bayou-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Use WSS**
> When enabled, Bayou will use Secure WebSockets instead of normal WebSockets.
>
> When this is enabled the following options will be available:
>
> * **Enabled**: Turns on/off Requiring SSL Certificate.
> * **Certificate Path**: File Path for the certificate
> * **Certificate Password**: Password for certificate
> * **SSL Protocol**: The protocol you would like to use for encryption.
### :gear: **MTU**
> Maximum Transmission Unity for the unreliable channel (in bytes)
### :gear: **Port**
> The port you want to bind the server to. Default port is 7770.
### :gear: **Maximum Clients**
> The maximum amount of clients allowed to connect to the server. Default is 2000 clients.
### :gear: **Client Address**
> The Address the client should use to connect to the server.
@@ -0,0 +1,17 @@
---
description: >-
A WebRTC transport for FishNetworking, inspired by Bayou, FishyWebRTC,
SimpleWebTransport, Tugboat, and more.
---
# Canoe WebRTC
## Description
A WebRTC transport for FishNetworking that supports WebGL and Standalone builds with reliable and unreliable UDP channels, partial P2P via host, and exposed signaling functionality—built on Bayou, FishyWebRTC, SimpleWebTransport, Tugboat, and more.
***
## How to install
For installation and usage please visit the project's [GitHub here](https://github.com/gmrodriguez124/CanoeWebRTC).
@@ -0,0 +1,19 @@
---
description: >-
Blitz Relay for Fish-Networking is a transport for a free, self-hostable
relay.
---
# Blitz Relay for FishNet
## Description
[Blitz Relay for FishNet](https://github.com/abdelfattahradwan/blitz-relay-for-fishnet) is a relay transport that routes all client traffic through a free self-hostable [Blitz Relay](https://github.com/abdelfattahradwan/blitz-relay) server instance, eliminating the need for clients to have publicly reachable IP addresses or open ports.
This makes it ideal for deployments where NAT traversal or firewall restrictions prevent direct peer‑to‑peer connections. Internally, the transport uses a modified build of **LiteNetLib** for its UDP connections to the relay, ensuring efficient and reliable communication.
You can find out more about Blitz Relay here: [https://github.com/abdelfattahradwan/blitz-relay](https://github.com/abdelfattahradwan/blitz-relay)
## How to install
For installation and usage please visit the project's [GitHub here](https://github.com/abdelfattahradwan/fishyblitzrelay).
@@ -0,0 +1,53 @@
---
description: >-
FishyEOS integrates Epic Online Services with FishNet, enabling matchmaking
and relay through the PlayEveryware EOS Plugin for Unity.
---
# FishyEOS (Epic Online Services)
## Description
EOS transport allows you to utilize Epic's Online Services, such as matchmaking and relay, as the base of your FishNet connection.\
\
FishyEOS uses the [PlayEveryware EOS Plugin for Unity SDK](https://eospluginforunity.playeveryware.com/), which is a wrapper API/SDK for developers using C# and Unity to take advantage of Epic's Online Services API.
***
## Compatibility
<table data-full-width="false" data-search="false"><thead><tr><th width="149">System</th><th width="198">Supported?</th><th>Epic Overlay Support?</th></tr></thead><tbody><tr><td>Windows</td><td><mark style="color:green;">Supported</mark></td><td><mark style="color:green;">Yes</mark></td></tr><tr><td>MacOS</td><td><mark style="color:green;">Supported</mark></td><td><mark style="color:red;">No</mark></td></tr><tr><td>Linux</td><td><mark style="color:green;">Supported</mark></td><td><mark style="color:red;">No</mark></td></tr><tr><td>Web</td><td><mark style="color:red;">Not Supported</mark></td><td><mark style="color:red;">No</mark></td></tr><tr><td>IOS</td><td><mark style="color:green;">Supported</mark></td><td><mark style="color:red;">No</mark></td></tr><tr><td>Android</td><td><mark style="color:green;">Supported</mark></td><td><mark style="color:red;">No</mark></td></tr><tr><td>Xbox</td><td><mark style="color:yellow;">In Preview</mark></td><td><mark style="color:yellow;">Unknown</mark></td></tr><tr><td>PlayStation</td><td><mark style="color:yellow;">In Preview</mark></td><td><mark style="color:yellow;">Unknown</mark></td></tr><tr><td>Nintendo</td><td><mark style="color:yellow;">In Preview</mark></td><td><mark style="color:yellow;">Unknown</mark></td></tr></tbody></table>
***
## How to install
Please visit the GitHub locations for official installation and usage instructions.
Main: [https://github.com/ETdoFresh/FishyEOS](https://github.com/ETdoFresh/FishyEOS)
Fork: [https://github.com/FirstGearGames/FishyEOS](https://github.com/FirstGearGames/FishyEOS).
{% hint style="warning" %}
Remember that this transport requires a separate installation of the PlayEveryware EOS for Unity SDK. Installation instructions for that are included in the GitHub pages above.
{% endhint %}
***
## Component settings
* Maximum Clients: Maximum number of players which may be connected at once
#### EOS
* Socket Name: Socket ID \[Must be the same on all clients and server]
* Remote Server Product User ID: Server Product User ID. Must be set for remote clients.
* Auto Authenticate: Automatically Authenticate/Login to EOS Connect when starting server or client.
* Auto Connect Data: All the data necessary to login to EOS and connect to a remote peer.
* Login Credential Type:
* ID:
* Token:
* Display Name:
* Automatically Create Device ID:
* Auth Scope Flags:
* Timeout:
@@ -0,0 +1,50 @@
---
description: >-
FishyFacepunch connects FishNet to Steam via the Facepunch.Steamworks API,
offering a simpler wrapper over Steamworks.Net for your transport layer.
---
# FishyFacepunch (Steam)
## Description
FishyFacepunch is a transport to interface with Steam using Facepunch.Steamworks API.\
\
You will need [FishyFacepunch](https://github.com/FirstGearGames/FishyFacepunch) to be the transport layer, and you will need [FacePunch.Steamworks](https://github.com/Facepunch/Facepunch.Steamworks), which is a subjectively simpler wrapper for the Steamworks.Net API.\
\
See the How to Install section to setup the Transport and FacePunch.Steamworks.
***
## Compatibility
<table data-full-width="false" data-search="false"><thead><tr><th width="149">System</th><th width="198">Supported?</th></tr></thead><tbody><tr><td>Windows</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>MacOS</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>Linux</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>Web</td><td><mark style="color:red;">Not Supported</mark></td></tr><tr><td>IOS</td><td><mark style="color:red;">Not Supported</mark></td></tr><tr><td>Android</td><td><mark style="color:red;">Not Supported</mark></td></tr><tr><td>Xbox</td><td><mark style="color:red;">Not Supported</mark></td></tr><tr><td>PlayStation</td><td><mark style="color:red;">Not Supported</mark></td></tr><tr><td>Nintendo</td><td><mark style="color:red;">Not Supported</mark></td></tr></tbody></table>
***
## How to install
To install visit [https://github.com/FirstGearGames/FishyFacepunch](https://github.com/FirstGearGames/FishyFacepunch) and follow the Setup instructions.
{% hint style="warning" %}
Note that this transport requires Facepunch.Steamworks to be installed separately, as well as .Net 4x or greater. Links to install these should be on the GitHub as well.
{% endhint %}
***
## Component settings
<div align="left"><figure><img src="../../.gitbook/assets/facepunch-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
* **Steam App ID:** The App ID assigned to your game when registered with Steam. The default is 480 which is Steam's testing game (SpaceWar).
#### Server
* **Server Bind Address:** Used if you want to manually Bind a Steam ID to the server.
* **Port:** The port you want the server to be bound to. Default is 27015
* **Maximum Clients:** The maximum number of clients you would like to connect to the server. Default is 16.
#### Client
* **Client Address:** The Steam ID of the server you are connecting to. The Servers Steam ID if its standalone, or the Hosts Client Steam ID if the server is a host.
* **Timeout (Seconds):** The amount of time allowed to establish a connection, in seconds.
@@ -0,0 +1,46 @@
---
description: A Photon Realtime transport for Fish-Networking.
---
# FishyRealtime (Photon)
{% hint style="danger" icon="dollar-sign" %}
While the FishyRealtime Transport itslef is free and under the MIT license, Exit Games' Photon Realtime is subject to their own service charges and license.
{% endhint %}
## Description
FishyRealtime is a transport that allows the [Photon Realtime](https://www.photonengine.com/Realtime) service from the company **Exit Games** to work with FishNet!
***
## Compatibility
<table data-full-width="false" data-search="false"><thead><tr><th width="149">System</th><th width="198">Supported?</th></tr></thead><tbody><tr><td>Windows</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>MacOS</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>IOS</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>Android</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>Linux</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>Xbox</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>PlayStation</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>Nintendo</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>Web</td><td><mark style="color:red;">Not Supported</mark></td></tr></tbody></table>
***
## How to install
Please visit the official GitHub link for installation and usage instructions.
Main: [https://github.com/REIO7200/FishyRealtime](https://github.com/REIO7200/FishyRealtime)
{% hint style="warning" %}
To reiterate, this transport does depend on installing the Photon Realtime SDK separately.
{% endhint %}
***
## Component settings
* **Photon APP ID:** The app id of the Photon Realtime product.
* **App Version:** The version of the product (game), only clients with the same version can connect to each other.
#### Default room options
* **Max Players:** Default max players.
* **Is Visible:** Whether Room is Visible to Public Room List.
* **Is Open:** Whether the room is public or private.
* **Connection Protocol:** Connection Type.
* **Region:** The Region the Server is hosted on.
@@ -0,0 +1,41 @@
---
description: >-
FishySteamworks is a reformed version of FizzySteamworks, delivering major
performance gains and full support for Heathen Engineering’s Steamworks SDK
Toolkit.
---
# FishySteamworks (Steam)
## Description
FishySteamworks is FizzySteamworks reformed. FishySteamworks has significant performance improvements and has been made to fully support [Toolkit for Steamworks SDK](https://kb.heathen.group/toolkit-for-steamworks-sdk/steamworks) by _Heathen Engineering._
***
## Compatibility <a href="#server-and-host" id="server-and-host"></a>
<table data-full-width="false" data-search="false"><thead><tr><th width="149">System</th><th width="198">Supported?</th></tr></thead><tbody><tr><td>Windows</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>MacOS</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>Linux</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>Web</td><td><mark style="color:red;">Not Supported</mark></td></tr><tr><td>IOS</td><td><mark style="color:red;">Not Supported</mark></td></tr><tr><td>Android</td><td><mark style="color:red;">Not Supported</mark></td></tr><tr><td>Xbox</td><td><mark style="color:red;">Not Supported</mark></td></tr><tr><td>PlayStation</td><td><mark style="color:red;">Not Supported</mark></td></tr><tr><td>Nintendo</td><td><mark style="color:red;">Not Supported</mark></td></tr></tbody></table>
***
## How to install
Github: [https://github.com/FirstGearGames/FishySteamworks/](https://github.com/FirstGearGames/FishySteamworks/)\
\
Download and import the latest package from the [GitHub releases](https://github.com/FirstGearGames/FishySteamworks/releases) into your Unity FishNet project and add the **FishySteamworks** component to your [Transport Manager.](../components/managers/transportmanager/)
{% hint style="warning" %}
FishySteamworks is dependent upon [Steamworks.NET](https://steamworks.github.io/). An [installation article](https://steamworks.github.io/installation/#unity-instructions) for Unity is available on their webpage.
{% endhint %}
***
## Component settings <a href="#server-and-host" id="server-and-host"></a>
* **Steam App Id:** is the Id for your steam application. 480 is the default, which is often used as a test App Id.
* **Server Bind Address:** Which IP the server will bind/listen on. The default value is empty.
* **Port:** Indicates which port the server will listen on.
* **Peer To Peer:** Will allow clients to act as [host](../../guides/high-level-overview/terminology/server-client-host.md#server-and-host-2) when running your project. IP addresses are **NOT** revealed.
* **Maximum Clients:** is how many players can be connected to the server at once.
* **Client Address:** is the IP of the server, which clients connect to. Empty is the default value for local testing.
@@ -0,0 +1,51 @@
---
description: >-
FishyUnityTransport integrates Unity’s Official Transport with FishNet,
supporting both 1.0 and 2.0 while enabling Unity Multiplayer Services like
Relay.
---
# FishyUnityTransport
## Description
A transport to utilize Unity's Official Transport with FishNet. Supports both Unity Transport 1.0 and Unity Transport 2.0\
\
Using **FishyUnityTransport** also allows you to utilize some of [Unity's Multiplayer Services](https://unity.com/solutions/multiplayer), like [Relay](https://unity.com/products/relay)!
***
## Compatibility
<table data-full-width="false" data-search="false"><thead><tr><th width="149">System</th><th width="198">Supported?</th></tr></thead><tbody><tr><td>Windows</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>MacOS</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>Linux</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>Web</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>IOS</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>Android</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>Xbox</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>PlayStation</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>Nintendo</td><td><mark style="color:green;">Fully Supported</mark></td></tr></tbody></table>
***
## How to install
For installation instructions and usage please visit the official GitHub site.
Main: [https://github.com/ooonush/FishyUnityTransport](https://github.com/ooonush/FishyUnityTransport)
***
## Component settings
{% hint style="warning" %}
Settings marked in <mark style="color:yellow;">**Yellow**</mark> are only supported on Unity Transport 2.0!
{% endhint %}
* **Protocol Type:** Configure whether the transport is done via direct connection or over Unity Relay.
* <mark style="color:yellow;">**Use Web Sockets:**</mark> Per default the client/server will communicate over UDP. Set to true to communicate with WebSocket.
* <mark style="color:yellow;">**Use Encryption:**</mark> Per default the client/server communication will not be encrypted. Select true to enable DTLS for UDP and TLS for Websocket
* **Max Packet Queue Size:** The maximum amount of packets that can be in the internal send/receive queues. Basically this is how many packets can be sent/received in a single update/frame.
* **Max Payload Size:** The maximum size of an unreliable payload that can be handled by the transport.
* **Heartbeat Timeout (ms):** Timeout in milliseconds after which a heartbeat is sent if there is no activity.
* **Connect Timeout (ms):** Timeout in milliseconds indicating how long we will wait until we send a new connection attempt.
* **Max Connect Attempts:** The maximum amount of connection attempts we will try before disconnecting.
* **Disconnect Timout (ms):** Inactivity timeout after which a connection will be disconnected. The connection needs to receive data from the connected endpoint within this timeout. Note that with heartbeats enabled, simply not sending any data will not be enough to trigger this timeout (since heartbeats count as connection events
* **Connection Data:**
* **Address:** IP address of the server (address to which clients will connect to)
* **Port:** UDP port of the server.
* **Server Listen Address:** IP address the server will listen on. If not provided, will use localhost.
* **Maximum Clients**: The Number of Clients allowed to connect to the FishNet server.
@@ -0,0 +1,17 @@
---
description: >-
A WebRTC transport plugin for FishNetworking that brings UDP to the browser
with reliable and unreliable channels, built on Bayou and SimpleWebTransport.
---
# FishyWebRTC
## Description
This WebRTC transport plugin extends FishNetworking with full browser‑based UDP support, enabling both reliable and unreliable channels directly in WebGL builds. It makes multiplayer communication possible in the browser without sacrificing performance or flexibility. While clients can only be run in WebGL (due to the JavaScript‑based WebRTC implementation), servers can be built for most platforms, with Linux Dedicated Server builds tested. Multipass can be used to combine Yak or other transports for hybrid offline/online play, and HTTPS signaling can be added via a reverse proxy. With straightforward installation through Unity’s Package Manager and minimal setup, this plugin provides a practical way to bring WebRTC networking into FishNetworking projects.
***
## How to install
For installation and usage please visit the project's [GitHub here](https://github.com/cakeslice/FishyWebRTC).
@@ -0,0 +1,41 @@
---
description: >-
Multipass lets a single server run multiple transports simultaneously, uniting
players across platforms in the same game.
---
# Multipass
## Description
**Multipass** is a pass-through transport that allows multiple transports to run on the server at once. For example, you may want to run Tugboat for your desktop or mobile users, and Bayou for your web users. With **Multipass** a single server build can run both, joining players from both together in the same game.
For usage see the [guide](../../guides/features/transports/multipass.md#setup).
***
## Compatibility
<table data-full-width="false"><thead><tr><th width="149">System</th><th width="198">Supported?</th></tr></thead><tbody><tr><td>All Platforms</td><td><mark style="color:green;">Fully Supported</mark></td></tr></tbody></table>
***
## How to install
Multipass comes with FishNet by default! No extra downloads needed.\
\
Just add Multipass to your [Transport Manager](../components/managers/transportmanager/) and follow the usage guide mentioned in General above.
***
## Settings
<div align="left"><figure><img src="../../.gitbook/assets/multipass-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: **Global Server Actions**
> **W**hile enabled, this will perform server actions such as start or stop server on all transports.
### :gear: **Transports**
> A collection of [transports](../../guides/features/transports/) you wish **Multipass** to support.
@@ -0,0 +1,71 @@
---
description: >-
The default transport of FishNet, utilizing the power, efficiency and
reliability of LiteNetLib.
---
# Tugboat
## Description
Tugboat uses [LiteNetLib](https://github.com/RevenantX/LiteNetLib) to support reliable and unreliable messages. This is the default transport for Fish-Networking and will automatically be added to your [NetworkManager](../components/managers/network-manager.md) if no other [transport](./) has been added already. It supports a large variety of platforms, and is a good choice for many games.
***
## Compatibility <a href="#server-and-host" id="server-and-host"></a>
<table data-full-width="false" data-search="false"><thead><tr><th width="149">System</th><th width="198">Supported?</th></tr></thead><tbody><tr><td>Windows</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>MacOS</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>Linux</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>Web</td><td><mark style="color:red;">Not Supported</mark></td></tr><tr><td>IOS</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>Android</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>Xbox</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>PlayStation</td><td><mark style="color:green;">Fully Supported</mark></td></tr><tr><td>Nintendo</td><td><mark style="color:green;">Fully Supported</mark></td></tr></tbody></table>
***
## How to install
Tugboat is the default transport of FishNet! Which means it comes with FishNet by default when Importing FishNet from your favorite source.
The [Transport Manager](../components/managers/transportmanager/) will automatically make this the default transport at runtime, if you did not add any other Transport to the Network Manager Game Object.
***
## Settings <a href="#server-and-host" id="server-and-host"></a>
<div align="left"><figure><img src="../../.gitbook/assets/tugboat-component.png" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>
### :gear: Stop Sockets On Thread
> When enabled, causes the local server and client sockets to be stopped using a new thread. This option can be useful for ensuring that the socket shutdown process does not block the main thread, which may help with smoother shutdowns or prevent the application from freezing during network cleanup.
### :gear: Don't Route
> Enable **Don't Route** if you want your Tugboat server or client to send data directly to the local interface, avoiding any network routing by the operating system. This is an advanced option primarily for special networking requirements.
### :gear: **Unreliable MTU**
> This is the largest size an unreliable packet may be. When a single outbound data exceeds this value it is sent reliably. Smaller unreliable datas will be automatically split over multiple unreliable sends.
### :gear: **Reuse Address**
> Allows the same address and port to be used multiple times by the server. This can be useful if you wish to launch multiple builds or server instances on the same machine using the same configuration.
### :gear: I**Pv4 Bind Address**
> This is which address to bind the server to. If set and IPv4 is not available this will cause a socket error upon server start.
### :gear: **Enable IPv6**
> Enables IPv6 binding when available. In some cases you may want this disabled if you have an IPv6 interface you do not want used.
### :gear: **IPv6 Bind Address**
> This is which address to bind the server to. If set and IPv6 is not available this will cause a socket error upon server start.
### :gear: **Port**
> Is which port the server will listen on. This is also the port clients will connect to. In some instances you may need to change this at runtime using `TransportManager.SetPort()`.
### :gear: **Maximum Clients**
> **Maximum Clients** is the maximum active clients allowed before the transport begins to deny connections.
### :gear: **Client Address**
> This is which address to connect to as a client. This is typically your server address. Localhost is set as default for local testing.
@@ -0,0 +1,39 @@
---
description: >-
Yak is an offline transport that runs your multiplayer code without opening
any sockets, seamlessly supporting offline/singleplayer play.
---
# Yak (Pro Feature)
{% hint style="info" icon="rectangle-pro" %}
Yak is part of Fish-Networking Pro features.
{% endhint %}
## Description
An offline transport that runs off your multiplayer code. No local or remote connections are made using this transport.
Besides being an offline transport, Yak API behaves exactly as our many other transports. In result, you do not need to change any of your code to take advantage of Yak.
To support offline play and online play you will want to consider using [Multipass](multipass.md) with Yak and an online transport of your choice.
***
## Compatibility
<table data-full-width="false"><thead><tr><th width="149">System</th><th width="198">Supported?</th></tr></thead><tbody><tr><td>All Platforms</td><td><mark style="color:green;">Fully Supported</mark></td></tr></tbody></table>
***
## How to install
Yak is part of FishNet Pro! So you must have purchased pro. See how to purchase and download FishNet Pro [here](../../overview/readme/pro-projects-and-support.md).\
\
After Installing FishNet Pro, just add Yak to your Transport manager, most likely you will be adding Yak onto Multipass like mentioned in the General Section above.
***
## Settings
No settings needed to be configured with Yak.