新增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,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.