新增FishNet文档
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
---
|
||||
description: >-
|
||||
This section will go over common limitations and issues you may run into, what
|
||||
FishNet's warning and error logs mean, and how to report problems.
|
||||
---
|
||||
|
||||
# Troubleshooting
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
---
|
||||
description: A well crafted bug report will result in bugs being resolved much quicker.
|
||||
---
|
||||
|
||||
# Creating Bug Reports
|
||||
|
||||
New bug reports can be created by navigating [here](https://github.com/FirstGearGames/FishNet/issues/new?assignees=\&labels=\&projects=\&template=bug_report.md\&title=). You will need to be logged into GitHub to create a bug report.
|
||||
|
||||
## Keep an eye on your reports
|
||||
|
||||
If your bug report is missing information we may close it out asking you to submit a new report.
|
||||
|
||||
Sometimes bug reports perfectly meet our guidelines but require more information. When this happens we will notify you in the bug report of what information we need, and place a 'waiting on information' flag on the bug report.
|
||||
|
||||
If we do request more information and receive no response within 2 weeks the report will likely be closed to keep prioritization and order. You can still comment on closed reports; we will re-open them as needed.
|
||||
|
||||
## Issue template
|
||||
|
||||
When creating a new issue on our GitHub you will be presented with a template. Provided below is detail information on how to complete the template.
|
||||
|
||||
### Necessary information
|
||||
|
||||
When filling out your report please include the following:
|
||||
|
||||
* Unity version.
|
||||
* Fish-Networking version.
|
||||
* Discord link where you troubleshot the issue.
|
||||
|
||||
{% hint style="info" %}
|
||||
If you are not able to join our Discord to troubleshoot please specify this in place of where you would include the Discord link. We still expect you to troubleshoot the issue locally if you are unable to connect with our helpers.
|
||||
{% endhint %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Leaving your Discord name in our server, or email address(less preferred) will allow us to contact you if you're unresponsive to the bug report while we still need more information.
|
||||
{% endhint %}
|
||||
|
||||
### Description
|
||||
|
||||
Provide a brief description of the bug report. This should be a summary of what causes the bug or how the bug is affecting your project.
|
||||
|
||||
### Replication
|
||||
|
||||
In an ordered fashion please provide step-by-step details on how to reproduce the bug. Be sure to indicate if starting as client, server, if multiple builds must be running, what actions to take, and so on.
|
||||
|
||||
### Expected behavior
|
||||
|
||||
Describe what you expect the behavior to be. This helps us know if the result is intended, as well could give us insight on what may be going wrong.
|
||||
|
||||
### Media
|
||||
|
||||
If there is any media or content which could assist us in resolving your issue please provide it here. Media could be a variety of things such as images, stack traces, videos, links and more. If you are providing code samples or stacktraces please use text.
|
||||
|
||||
## Sample project
|
||||
|
||||
A sample project is not always required; but, at times issues are too complex to reproduce using the issue template. When this is true we will ask you to create a sample project for us to look at. When including a sample project also state how to use the project.
|
||||
|
||||
### Guidelines
|
||||
|
||||
Sample projects should always follow guidelines to keep them simple and small.
|
||||
|
||||
* All samples must be within their own folder so when imported into a Unity project they will not be merged with other files. For example, MyBugReport\Scripts, MyBugReport\Prefabs, and so on.
|
||||
* Provide only files needed to reproduce the problem. Do not provide extra models, prefabs, code, etc unrelated to the problem. Delete any code in provided scripts which does not directly affect your issue.
|
||||
* Do not include Fish-Networking within your sample project; only include the files needed to reproduce the problem.
|
||||
* Use the old input system.
|
||||
* Export as a **unitypackage.** To do so right-click your folder, Export Package, and uncheck **Include Dependencies** at the bottom.
|
||||
|
||||
{% hint style="info" %}
|
||||
GitHub does not allow uploading unitypackage files. You may have to archive your exported package before uploading. Please use zip format when doing so.
|
||||
{% endhint %}
|
||||
|
||||
{% hint style="warning" %}
|
||||
Model files can be large and pink materials are not fun to look at! If possible replace models with standard meshes and use the standard render pipeline.
|
||||
{% endhint %}
|
||||
|
||||
<figure><img src="../../../.gitbook/assets/bug-report-files-to-export.png" alt=""><figcaption><p>Example of files found within a sample project.</p></figcaption></figure>
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
---
|
||||
description: This is an example of what a created bug report might look like.
|
||||
---
|
||||
|
||||
# Report Example
|
||||
|
||||
Below is a bug report for a SyncVar which is not sending to clients. You do not need to include headers as demonstrated; they are only shown here so it's clear what information is being displayed.
|
||||
|
||||
{% hint style="info" %}
|
||||
If troubleshooting was not performed or applicable fields are missing in the bug report there is a fair chance the submitter would be asked to update their issue, and until then the issue would be suspended.
|
||||
{% endhint %}
|
||||
|
||||
> **Unity version:**
|
||||
>
|
||||
> * Unity 2021.3.10f.
|
||||
>
|
||||
> **FishNet Version:**
|
||||
>
|
||||
> * FishNet 4.3.1
|
||||
>
|
||||
> **Discord Troubleshot Link/What I've tried:**
|
||||
>
|
||||
> * https://discord.com/channels/123456
|
||||
>
|
||||
> **Description:**
|
||||
>
|
||||
> When I set a SyncVar on the server non-host clients do not get the update. Callbacks are not working either.
|
||||
>
|
||||
> **Replication:**
|
||||
>
|
||||
> This can be reproduced in two editors.
|
||||
>
|
||||
> * Start 1st editor as clientHost or server.
|
||||
> * In a player NetworkBehaviour script update an int SyncVar in Awake, wrapped in InstanceFinder.IsServerStarted checks.
|
||||
> * Add
|
||||
> * Start 2nd editor as client only.
|
||||
> * Have editor 1 spawn the player object for 2nd editor.
|
||||
>
|
||||
> **Expectation:**
|
||||
>
|
||||
> * Both the 1st and 2nd editor get callbacks.
|
||||
> * The SyncVar value should synchronize to the 2nd editor.
|
||||
|
||||
At a glance this would suggest everything is working as intended. The server is not active on the 2nd editor (client only) so the InstanceFinder.IsServerStarted check is failing, and the value is never applied locally. The 1st editor is not sending the value because SyncTypes set in Awake are assumed applied in server and client since Awake always fires regardless of network state.
|
||||
|
||||
Although this is covered in the [SyncType documentation ](../../features/network-communication/synchronizing/)the behavior could definitely be somewhat of a gotcha. If it's possible the developers troubleshooting steps wouldn't have caught this gotcha, we would likely give the answer above and ask the developer to close the issue if it were now resolved.
|
||||
+320
@@ -0,0 +1,320 @@
|
||||
---
|
||||
description: Discover frequently asked questions and their answers.
|
||||
---
|
||||
|
||||
# FAQ
|
||||
|
||||
## Miscellaneous
|
||||
|
||||
<details>
|
||||
|
||||
<summary>How do I send some initial data to the server as soon as I connect and before my player spawns?</summary>
|
||||
|
||||
Broadcast are generally the best choice for sending data without a player object. Many developers trade this data in a custom [authenticator ](../../fishnet-building-blocks/components/utilities/authenticator.md)class, which allows data to be sent before the client initializes anything at all for the network. See our PasswordAuthenticator script for an example of doing this.
|
||||
|
||||
Another approach is to use a custom player spawner instead of our [PlayerSpawner](../../fishnet-building-blocks/components/playerspawner.md). You may send broadcasts back and forward freely, and only spawn your player when you feel is right. See [broadcasts](../features/network-communication/broadcasts.md) for more information on this feature.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Why can I see my player object but not control it?</summary>
|
||||
|
||||
Most often when this occurs you actually are able to control your player, but you simply do not see them because your game could be using the incorrect camera. This is seen when more than one player spawns, and the player prefab has a live camera beneath them.
|
||||
|
||||
To resolve this issue simply use one camera in the scene and take over it as needed, or disable the camera on your player prefab and only enable it if you own the object.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>How do I update to a new or Pro version of Fish-Networking?</summary>
|
||||
|
||||
You can install Fish-Networking free over Pro, and Pro over free without any issues. Just download free or Pro and import normally. See our [Pro section](../../overview/readme/pro-projects-and-support.md) for information on downloading Pro.
|
||||
|
||||
If you import a new version of Fish-Networking and there are immediately compile errors, delete your FishNet folder then import the latest version again.
|
||||
|
||||
</details>
|
||||
|
||||
## Hosting and connectivity
|
||||
|
||||
<details>
|
||||
|
||||
<summary>How do I make rooms in Fish-Networking?</summary>
|
||||
|
||||
There are several ways to make rooms within Fish-Networking.
|
||||
|
||||
You can use a third party service which creates individual server instances, each acting as their own. There are several services which provide this, an example of one is [PlayFlow Cloud](../server-hosting/services/playflow-cloud/).
|
||||
|
||||
Another option is to have a single Fish-Networking instance manage rooms in a single build. This reduces the complexity of a third party service but requires you to develop with [stacked scenes](../features/scene-management/scene-stacking.md) in mind. Our project [Lobby and Worlds ](../../overview/readme/pro-projects-and-support.md#projects)accomplishes this, and is available to supporters.
|
||||
|
||||
While stacked scenes aren't necessarily difficult, and support for them are built-into Fish-Networking, there are still some Unity limitations around them. An example being, not all physics API are available in stacked scenes. See [Physics Scenes](https://docs.unity3d.com/ScriptReference/PhysicsScene.html) for more information; there is also PhysicsScene2D.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Why are my Meta Quest/mobile players not immediately disconnecting when they close the game?</summary>
|
||||
|
||||
Mobile apps don't typically close like a normal application. Instead, mobile apps are suspended so that you may "re-open" them quickly.
|
||||
|
||||
Clients will likely disconnect if the game remains in the background for longer than the timeout settings on your Client/ServerManager.
|
||||
|
||||
Often you can utilize the Unity callback OnApplicationPause in mobile games to tell the ClientManager to disconnect.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>How can I have p2p (player hosted) games without paying for dedicated servers?</summary>
|
||||
|
||||
A large variety of third party services allow you to host p2p games. Steam and EOS are the two most common ones, but plenty are available. We support both Steam and EOS.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Why don't my games connect when I press server on one device and client on another even on a LAN?</summary>
|
||||
|
||||
When trying to connect to your IP directly you must allow connections through your firewall. Be sure to adjust your firewall to allow the port used by your game.
|
||||
|
||||
To help you find and join LAN games, you can use one of the Network Discovery addons [Fish-Networking Discovery](https://github.com/abdelfattahradwan/Fish-Networking-Discovery) or [Unity Network Discovery](https://github.com/FrantisekHolubec/UnityNetworkDiscovery).
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>What can I do if I encounter a "port already used"?</summary>
|
||||
|
||||
Check to make sure you aren't trying to start the FishNet server twice, perhaps due to manually starting it as well as FishNet automatically starting it if enabled in the [ServerManager ](../../fishnet-building-blocks/components/managers/server-manager.md)component's [#start-on-headless](../../fishnet-building-blocks/components/managers/server-manager.md#start-on-headless "mention") option.\
|
||||
You can also try enabling the [ReuseAddress](../../fishnet-building-blocks/transports/tugboat.md#reuse-address) option if using the [Tugboat transport](../../fishnet-building-blocks/transports/tugboat.md). This will allow the server to bind to the port even if it was recently used, making server restarts and multiple concurrent instances possible without port conflicts.
|
||||
|
||||
</details>
|
||||
|
||||
## Missing or hidden objects
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Why are the (mesh/sprite/etc.) renderers on my object disabled on the clientHost?</summary>
|
||||
|
||||
By default when the clientHost is not an observer of an object the renders for the object are disabled. This is to simulate as if the object is not spawned for the clientHost, though it of course is as the server is still using the object.
|
||||
|
||||
You may disable this feature by changing a setting on the [ObserverManager](../../fishnet-building-blocks/components/managers/observermanager/). It's also possible to disable this per [NetworkObject](../../fishnet-building-blocks/components/network-object.md).
|
||||
|
||||
You can also utilize [NetworkObject events](https://fish-networking.com/FishNet/api/api/FishNet.Object.NetworkObject.html#events) to manually update renderers.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Why are my objects in the scene disabled?</summary>
|
||||
|
||||
**First most, check the console for any Fish-Networking warnings or errors.**
|
||||
|
||||
Scene objects become disabled when the client is not an observer of the scene. Our [observer system](../features/observers/) controls what objects clients can see, spawn, and transmit.
|
||||
|
||||
The most common reason a client is not an observer of the scene is because the server has not added the client to the scene. This can be done manually if you know the client has the scene loaded, using a Fish-Networking SceneManager reference, and calling AddConnectionToScene. EG: sceneManager.AddConnectionToScene(yourClient).
|
||||
|
||||
You may just as well use our automated system but telling the SceneManager to load the scene for the client. See [this page](../features/scene-management/loading-scenes/) for more information on that.
|
||||
|
||||
If you are starting entering play mode with only one scene you may be manually spawning the player but not adding to starting scene. See our PlayerSpawner script within your Fish-Networking installation for an example of how to instantiate player prefabs, and add clients to scenes.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Why can my client not see objects?</summary>
|
||||
|
||||
Related: Why are my objects in the scene disabled?
|
||||
|
||||
Related: Why are the mesh/sprite/etc. renderers on my object disabled on the clientHost?
|
||||
|
||||
If a client is not an observer of an object then the server does not spawn the object for the client. See our [observers guide ](../features/observers/)for more information.
|
||||
|
||||
</details>
|
||||
|
||||
## SyncTypes (SyncVar, SyncList, etc.)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Why are my SyncTypes not syncing on other devices when I change it on the owner client?</summary>
|
||||
|
||||
Clients may update SyncTypes locally, but they are not synchronized over the network; only the server may synchronize SyncTypes. Typically, clients will send a Remote Procedure Call to the server indicating it wants to update something, and the server complies. See these guides for more information: [Remote Procedure Calls](../features/network-communication/remote-procedure-calls.md), [SyncTypes](../features/network-communication/synchronizing/).
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Why do I receive remote procedure calls before SyncType updates?</summary>
|
||||
|
||||
SyncTimes run on intervals, defaulted to every 100ms if the SyncType has changed; the interval may be changed on the [ServerManager](../../fishnet-building-blocks/components/managers/server-manager.md).
|
||||
|
||||
However, even if the interval is met, SyncTypes always synchronize after remote procedure calls (RPC), even if you set them before calling the RPC. You can change SyncTypes to synchronize first on a per SyncType basis using [SyncTypeSettings](https://fish-networking.com/FishNet/api/api/FishNet.Object.Synchronizing.SyncTypeSettings.html). Review also [SyncTypes guide](../features/network-communication/synchronizing/) thoroughly for updating a SyncTypes settings.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Why is the previous value in my SyncType's OnChange callback not correct?</summary>
|
||||
|
||||
This is a limitation on the host client, but it can be worked around quite easily. More details here: [#host-client-limitations](../features/network-communication/synchronizing/#host-client-limitations "mention")
|
||||
|
||||
</details>
|
||||
|
||||
## Remote Procedure Calls (RPCs)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>How do I know who sent a ServerRpc, should I pass in the LocalConnection each time as an argument?</summary>
|
||||
|
||||
By default only clients which own the objects may send a ServerRpc. You may bypass this restriction by setting 'RequireOwnership' to false in the ServerRpc attribute. If you've not bypassed this restriction, the sender will always be owner.
|
||||
|
||||
The [ServerRpc guide ](../features/network-communication/remote-procedure-calls.md#serverrpc)shows how to set RequireOwnership, as well how to know which spectator might be sending the RPC. You will notice in the guide a NetworkConnection is specified at the end of the RPC parameters. You do not pass in a connection when sending the ServerRpc, it's set automatically when you receive the RPC call.
|
||||
|
||||
</details>
|
||||
|
||||
## Errors and warnings
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Why do I get this error: "Library/ScriptAssemblies/FishNet.Codegen.Cecil.dll' will not be loaded due to errors"?</summary>
|
||||
|
||||
This happens if your API compatibility levels are on the wrong option. Simply go into your player settings and change them.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Why do I get the warning: "Cannot spawn object because server is not active and predicted spawning is not enabled."?</summary>
|
||||
|
||||
Typically only the server may spawn networked objects. You will see this warning if you try to network spawn an object on a client, while predicted spawning is not enabled.
|
||||
|
||||
Predicted spawning must be turned on in the [ServerManager](../../fishnet-building-blocks/components/managers/server-manager.md). See also the [PredictedSpawn component](../../fishnet-building-blocks/components/prediction/predictedspawn.md).
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Why do I get a NullReferenceException in SyncBase when an object spawns?</summary>
|
||||
|
||||
Most likely you are seeing this error because your SyncType does not have an initializer. When declaring SyncTypes they must be readOnly and initialized.
|
||||
|
||||
For example: `private readonly SyncVar<int> _mySv = new();`\
|
||||
\
|
||||
You can view more information about SyncTypes [here](../features/network-communication/synchronizing/).
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Why do I get the warning: "Cannot complete action because client is not active."?</summary>
|
||||
|
||||
You will see this warning if the client is not started. It's also possible to see this warning if you are trying to communicate with the server such as using a ServerRpc before the NetworkObject has finished initializing for the client, even if the client connection has started. (`obj.IsClientInitialized`) See NetworkBehaviour [API](https://fish-networking.com/FishNet/api/api/FishNet.Object.NetworkBehaviour.html) and [callback order](../features/networked-gameobjects-and-scripts/network-behaviour-guides.md#callbacks) for more information on this.
|
||||
|
||||
It's also possible you have a method decorated with the '\[Client]' attribute, such as if you want a method to only run on clients. This will cause the warning, even if your intents are to not have the client connected. If this is true, you may set LoggingType to Off within the Client attribute.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Why do I get the warning: "Cannot complete action because server is not active."?</summary>
|
||||
|
||||
You will see this warning if the server is not started. It's also possible to see this warning if you are trying to communicate with a client such as using a Target or ObserversRpc before the object is initialized for the server. See NetworkBehaviour [API](https://fish-networking.com/FishNet/api/api/FishNet.Object.NetworkBehaviour.html) and [callback order](../features/networked-gameobjects-and-scripts/network-behaviour-guides.md#callbacks) for more information on this.
|
||||
|
||||
It's also possible you have a method decorated with the '\[Server]' attribute, such as if you want a method to only run on server. This will cause the warning, even if your intents are to not have the server running. If this is true, you may set LoggingType to Off within the Server attribute.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Why do I get an error like this? "SceneId of 4013929391 not found in SceneObjects."?</summary>
|
||||
|
||||
You will see this error if the server thinks your client is in scene, when the client does not have the scene loaded. Using a [SceneCondition](../../fishnet-building-blocks/scriptableobjects/observerconditions/scenecondition.md) on the [ObserverManager ](../../fishnet-building-blocks/components/managers/observermanager/)will typically resolve this problem. You can simply add the ObserverManager component to your network manager and give it the scene condition in its [Default Conditions](../../fishnet-building-blocks/components/managers/observermanager/#default-conditions) list.
|
||||
|
||||
If you are already using a SceneCondition and are certain the correct scenes are being loaded then open the scenes which you are having problems with, and use the [**Reserialize NetworkObjects** utility](../../fishnet-building-blocks/configuration-and-tools.md#reserialize-networkobjects) from the (**Tools → Fish-Networking** **→ Reserialize NetworkObjects**) toolbar menu.
|
||||
|
||||
You can also troubleshoot this further by adding the DebugManager component to your NetworkManager and enable Write Scene Object Details. The next time you see the error it will also print the scene and object name the spawn or message was intended for.
|
||||
|
||||
In very rare cases this is a bug. If you've tried all the troubleshooting steps above without success consider reaching us on our[ Discord](../../#external-links) for help.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Why do I get this error? "'System.Void System.ParamArrayAttribute::.ctor()' is declared in another module and needs to be imported"?</summary>
|
||||
|
||||
On very rare occasion you may encounter this error after making a change to your script. This is a Unity bug that we have no way to resolve internally. The exact cause is unknown, but we know it's related to Unity caching something improperly in a script.
|
||||
|
||||
There are a few work-arounds that have worked consistently; most commonly adding a new empty method with a parameter (try without as well) and saving the script will resolve the issue. At some point the Unity cache will fix itself, and the empty method can later be removed.
|
||||
|
||||
Clearing the library cache seems to have no benefits of resolving this error. The only success we've seen besides the work around is moving everything to a completely new project. Because creating a new project is so much work it's recommended to use the work-around.
|
||||
|
||||
</details>
|
||||
|
||||
## Objects
|
||||
|
||||
<details>
|
||||
|
||||
<summary>What does the message "AssetPathHash is not set for GameObject ..." mean?</summary>
|
||||
|
||||
There unfortunately is not any definitive cause of this error. Usually restarting Unity will resolve the problem.
|
||||
|
||||
This message can also be seen when a NetworkObject is a prefab which is unable to save changes. If your object is a prefab check to make sure there are no missing scripts, or anything else preventing saving of the prefab.
|
||||
|
||||
If issues persist please reach us on our [Discord](../../#external-links).
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>How do I get the player game object?</summary>
|
||||
|
||||
You can get a list of all objects owned by a connection by using conn.Objects.
|
||||
|
||||
If you want to grab the first object spawned for a connection use conn.FirstObject. You can set the FirstObject at runtime if you have a preference to the 'FirstObject'.
|
||||
|
||||
If you want to know what objects you own as a client you can grab your own connection under clientManager.Connection.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>How can I make the player spawner spawn my player when I load the lobby into the game scene instead of immediately?</summary>
|
||||
|
||||
This is done by writing a custom player spawner. You can use our PlayerSpawner as an example, but instead of spawning immediately only spawn after a client has been added to a scene.
|
||||
|
||||
A good place to start is using the [ClientPresenceChangeEnd callback](../features/scene-management/#scene-events) to know when the client has entered the scene and has visibility of objects within it.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>How do I get an object from its NetworkObject Id?</summary>
|
||||
|
||||
In most cases you do not need to pass around a NetworkObject Id. The recommended approach, if sending over the network, is to send the NetworkObject reference itself. This automatically efficiently sends the NetworkObject information, and returns the proper object on the other end.
|
||||
|
||||
Should you have reasons to use the Id specifically you can look up spawned objects within the serverManager.Objects.Spawned collection, or clientManager.Objects.Spawned if client only. Note: these collections will likely be consolidated in a later release.
|
||||
|
||||
</details>
|
||||
|
||||
## Performance
|
||||
|
||||
<details>
|
||||
|
||||
<summary>How many CCU (concurrent users) can Fish-Networking have?</summary>
|
||||
|
||||
Our framework does not have any CCU limitations. How many players you are able to host on a single server varies greatly depending upon your server hardware, game mechanics, and your coding efficiency.
|
||||
|
||||
Several Fish-Networking games have achieved 500+ CCU, and thousands of NetworkObjects.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Can you use sharding (world splitting) in Fish-Networking?</summary>
|
||||
|
||||
Fish-Networking does not take any special actions to support nor restrict sharding. Some users experienced success with custom implementations of world sharding, but we do not officially support this feature.
|
||||
|
||||
With how powerful servers have become world sharding is rarely needed, and generally we discourage against it.
|
||||
|
||||
</details>
|
||||
@@ -0,0 +1,49 @@
|
||||
# Technical Limitations
|
||||
|
||||
Limitation is not a word we like to use in Fish-Networking, but unfortunately there are a few technical blocks with Unity, or restrictions in place for performance reasons. These limitations are considered reasonably acceptable and may never be resolved.
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Networked scene objects</summary>
|
||||
|
||||
When a scene object is networked they may behave differently.
|
||||
|
||||
A networked scene object will be disabled when a scene loads, and will not activate until the client or server is started. For clients specifically, networked scene objects will only activate when the server is sure the client has loaded the scene; this is done automatically through the Fish-Networking scene manager.
|
||||
|
||||
Our [SceneManager](../../fishnet-building-blocks/components/managers/scenemanager.md) allows instantiated networked objects to be moved between scenes, but networked scene objects may not. Unity cannot know a scene objects details without the scene being loaded first, so trying to spawn a scene object without the client having the scene loaded would result in errors.
|
||||
|
||||
Due to the movement restrictions just mentioned, networked scene objects may not be marked **DontDestroyOnLoad**, nor can the [NetworkObject.IsGlobal](../features/networked-gameobjects-and-scripts/networkobjects/#global-networkobject) feature be used. Both of these would place the scene object in a new scene, causing errors.
|
||||
|
||||
When a networked scene object is despawned it is always disabled, rather than destroyed. This is so you may spawn it at a later time. Manually destroying a scene object on the server is possible and would simply result in it never being spawned on clients.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Nested NetworkObjects and NetworkBehaviours</summary>
|
||||
|
||||
NetworkObjects which are nested on a prefab may not be unparented at runtime.
|
||||
|
||||
Root NetworkObjects may have their parent updated at runtime.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>PredictedSpawn</summary>
|
||||
|
||||
Predicted spawns currently cannot be spawned as nested.
|
||||
|
||||
Predicted spawns are currently not aligned with prediction interpolation.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>SyncType host client callbacks</summary>
|
||||
|
||||
There is a small limitation with all **SyncTypes** when running both the client and server in a single build.
|
||||
|
||||
While as the host client, the previous value, when applicable, in callbacks will be the current value or null if the `asServer` parameter is false. There is a workaround for this here: [#host-client-limitations](../features/network-communication/synchronizing/#host-client-limitations "mention")
|
||||
|
||||
</details>
|
||||
Reference in New Issue
Block a user