新增FishNet文档
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
---
|
||||
description: >-
|
||||
There are multiple commonly needed helper or debugging components that come
|
||||
with Fish-Networking.
|
||||
---
|
||||
|
||||
# Utilities
|
||||
|
||||
+9
@@ -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.
|
||||
+37
@@ -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.
|
||||
+43
@@ -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/).
|
||||
+29
@@ -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'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.
|
||||
Reference in New Issue
Block a user