Added NetworkSandbox.InPacketLoss, NetworkSandbox.OutPacketLoss, NetworkConnection.InPacketLoss, and NetworkSandbox.OutPacketLoss. These are measurements for inward and outward packet loss.

This commit is contained in:
Karrar
2024-08-23 06:05:14 +03:00
parent b10c8c8f06
commit 7e3a31bf94
7 changed files with 66 additions and 62 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -9,55 +9,6 @@
This component is used to replicate the position and rotation of an object. Therefore, its the same as the Network Transform, the difference is that Network Rigidbody must be used if you want to have client-side prediction over PhysX objects since it replicates several other properties necessary for correct prediction. This component is used to replicate the position and rotation of an object. Therefore, its the same as the Network Transform, the difference is that Network Rigidbody must be used if you want to have client-side prediction over PhysX objects since it replicates several other properties necessary for correct prediction.
</summary> </summary>
</member> </member>
<member name="M:Netick.Unity.NetworkSandbox.InitializePool(UnityEngine.GameObject,System.Int32,System.Boolean)">
<summary>
Initializes the pool for the specified prefab. After this method has been called for a certain prefab, all instances of that prefab will be recycled and reset when created/destroyed.
<para>Note: this method should only be called on <see cref="M:Netick.Unity.NetworkEventsListener.OnStartup(Netick.Unity.NetworkSandbox)"/>, in other words, just after Netick has been started. </para>
</summary>
<param name="networkedPrefab">Prefab to enable pooling for.</param>
<param name="preloadedAmount">How many instances to be preloaded.</param>
<param name="hideInactiveMembers">Pass true to hide inactive pool members.</param>
</member>
<member name="M:Netick.Unity.NetworkSandbox.GetPrefab(System.String)">
<summary>
Gets a Network Prefab by name.
<para>Note: this causes GC.</para>
</summary>
<param name="name"></param>
<returns>The Network Prefab</returns>
</member>
<member name="M:Netick.Unity.NetworkSandbox.Instantiate(UnityEngine.GameObject,UnityEngine.Vector3,UnityEngine.Quaternion)">
<summary>
Instantiates a prefab. This must be called instead of <see cref="M:UnityEngine.Object.Instantiate(UnityEngine.Object)"/> or its variations.
<para>Note: this must be called only for non-networked prefabs. If you want to instantiate a network prefab, use <see cref="!:NetworkInstantiate(GameObject, Vector3, Quaternion, NetworkPlayer)"/> instead.</para>
</summary>
<param name="prefab">The prefab to be instantiated.</param>
<param name="position">Position of the instantiated object.</param>
<param name="rotation">Rotation of the instantiated object.</param>
<returns></returns>
</member>
<member name="M:Netick.Unity.NetworkSandbox.NetworkInstantiate(UnityEngine.GameObject,UnityEngine.Vector3,UnityEngine.Quaternion,Netick.NetworkPlayer,Netick.SpawnPredictionKey)">
<summary>
Instantiates a network prefab.
<para>Commonly, this should only be called on the server, since only the server can instantiate network prefabs. However, the client can also call this to spawn-predict a prefab by providing a spawn key which must be the same on the server and client when this method is called. Read the docs to learn more about how to use spawn-prediction.</para>
<para>Note: make sure the prefab has been registered. </para>
<para>Note: the specified input source will be given to every <see cref="T:Netick.Unity.NetworkObject"/> child of this prefab.</para>
</summary>
<param name="prefab">The prefab to be instantiated.</param>
<param name="position">Position of the instantiated object.</param>
<param name="rotation">Rotation of the instantiated object.</param>
<param name="inputSource">Input source of the instantiated object.</param>
<returns></returns>
</member>
<member name="M:Netick.Unity.NetworkSandbox.Destroy(Netick.Unity.NetworkObject)">
/// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// ///
<summary>
Destroys a network object. Only call this on the server or on the client for spawn-predicted objects which have -1 Ids.
<para>Note: never call this on a child <see cref="T:Netick.Unity.NetworkObject"/> of the original prefab, only the root of the prefab.</para>
</summary>
<param name="obj">The object to destroy.</param>
<returns></returns>
</member>
<member name="P:Netick.Unity.NetworkSandbox.PhysicsPrediction"> <member name="P:Netick.Unity.NetworkSandbox.PhysicsPrediction">
<summary> <summary>
Use this to enable/disable Physics Prediction in the client at runtime. Use this to enable/disable Physics Prediction in the client at runtime.
@@ -142,9 +93,7 @@
</member> </member>
<member name="P:Netick.Unity.NetworkSandbox.Objects"> <member name="P:Netick.Unity.NetworkSandbox.Objects">
<summary> <summary>
A list containing all simulated/registered network objects [<see cref="T:Netick.Unity.NetworkObject"/>] currently. A dictionary containing all simulated/registered network objects [<see cref="T:Netick.Unity.NetworkObject"/>] currently.
<para>Note: to get a network object by id, use: <see cref="M:Netick.Unity.NetworkSandbox.TryGetObject(System.Int32,Netick.Unity.NetworkObject@)"/> </para>
</summary> </summary>
</member> </member>
<member name="P:Netick.Unity.NetworkSandbox.LocalPlayer"> <member name="P:Netick.Unity.NetworkSandbox.LocalPlayer">
@@ -191,6 +140,16 @@
Outgoing data in kilobytes per second (KBps). Outgoing data in kilobytes per second (KBps).
</summary> </summary>
</member> </member>
<member name="P:Netick.Unity.NetworkSandbox.InPacketLoss">
<summary>
<i><b>[Client Only]</b></i> Estimation of incoming packets that are being lost. Value ranges between 0.0 and 1.0, with 1.0 meaning all packets are being lost.
</summary>
</member>
<member name="P:Netick.Unity.NetworkSandbox.OutPacketLoss">
<summary>
<i><b>[Client Only]</b></i> Estimation of outgoing packets that are being lost. Value ranges between 0.0 and 1.0, with 1.0 meaning all packets are being lost.
</summary>
</member>
<member name="P:Netick.Unity.NetworkSandbox.InterpolationDelay"> <member name="P:Netick.Unity.NetworkSandbox.InterpolationDelay">
<summary> <summary>
<i><b>[Client Only]</b></i> Interpolation delay in seconds. <i><b>[Client Only]</b></i> Interpolation delay in seconds.
@@ -321,6 +280,54 @@
<i><b>[Server Only]</b></i> Unloads a scene asynchronously. <i><b>[Server Only]</b></i> Unloads a scene asynchronously.
</summary> </summary>
</member> </member>
<member name="M:Netick.Unity.NetworkSandbox.InitializePool(UnityEngine.GameObject,System.Int32,System.Boolean)">
<summary>
Initializes the pool for the specified prefab. After this method has been called for a certain prefab, all instances of that prefab will be recycled and reset when created/destroyed.
<para>Note: this method should only be called on <see cref="M:Netick.Unity.NetworkEventsListener.OnStartup(Netick.Unity.NetworkSandbox)"/>, in other words, just after Netick has been started. </para>
</summary>
<param name="networkedPrefab">Prefab to enable pooling for.</param>
<param name="preloadedAmount">How many instances to be preloaded.</param>
<param name="hideInactiveMembers">Pass true to hide inactive pool members.</param>
</member>
<member name="M:Netick.Unity.NetworkSandbox.GetPrefab(System.String)">
<summary>
Gets a Network Prefab by name.
<para>Note: this causes GC.</para>
</summary>
<param name="name"></param>
<returns>The Network Prefab</returns>
</member>
<member name="M:Netick.Unity.NetworkSandbox.Instantiate(UnityEngine.GameObject,UnityEngine.Vector3,UnityEngine.Quaternion)">
<summary>
Instantiates a prefab. This must be called instead of <see cref="M:UnityEngine.Object.Instantiate(UnityEngine.Object)"/> or its variations.
<para>Note: this must be called only for non-networked prefabs. If you want to instantiate a network prefab, use <see cref="M:Netick.Unity.NetworkSandbox.NetworkInstantiate(UnityEngine.GameObject,UnityEngine.Vector3,UnityEngine.Quaternion,Netick.NetworkPlayer)"/> instead.</para>
</summary>
<param name="prefab">The prefab to be instantiated.</param>
<param name="position">Position of the instantiated object.</param>
<param name="rotation">Rotation of the instantiated object.</param>
<returns></returns>
</member>
<member name="M:Netick.Unity.NetworkSandbox.NetworkInstantiate(UnityEngine.GameObject,UnityEngine.Vector3,UnityEngine.Quaternion,Netick.NetworkPlayer)">
<summary>
<i><b>[Server Only]</b></i> Instantiates a network prefab.
<para>This must only be called on the server, since only the server can instantiate network prefabs.</para>
<para>Note: make sure the prefab has been registered. </para>
<para>Note: the specified input source will be given to every <see cref="T:Netick.Unity.NetworkObject"/> child of this prefab.</para>
</summary>
<param name="prefab">The prefab to be instantiated.</param>
<param name="position">Position of the instantiated object.</param>
<param name="rotation">Rotation of the instantiated object.</param>
<param name="inputSource">Input source of the instantiated object.</param>
<returns></returns>
</member>
<member name="M:Netick.Unity.NetworkSandbox.Destroy(Netick.Unity.NetworkObject)">
<summary>
<i><b>[Server Only]</b></i> Destroys a network object.
<para>Note: never call this on a child <see cref="T:Netick.Unity.NetworkObject"/> of the original prefab, only the root of the prefab.</para>
</summary>
<param name="obj">The object to destroy.</param>
<returns></returns>
</member>
<member name="T:Netick.Unity.NetworkArray`1"> <member name="T:Netick.Unity.NetworkArray`1">
<summary> <summary>
A networked array. A networked array.
@@ -533,7 +540,12 @@
</member> </member>
<member name="M:Netick.Unity.NetworkBehaviour.FetchInput``1(``0@,System.Int32)"> <member name="M:Netick.Unity.NetworkBehaviour.FetchInput``1(``0@,System.Int32)">
<summary> <summary>
Fetchs a network input for this tick. Returns false if no input source is currently providing inputs to this Object, or when input loss occurs (in case of a remote input source). Fetches a network input for this tick. Returns false if no input source is currently providing inputs to this Object, or when input loss occurs (in case of a remote input source).
</summary>
</member>
<member name="M:Netick.Unity.NetworkBehaviour.FetchInput``1(``0@,System.Boolean@,System.Int32)">
<summary>
Fetches a network input for this tick. Returns false if no input source is currently providing inputs to this Object, or when input loss occurs (in case of a remote input source).
</summary> </summary>
</member> </member>
<member name="M:Netick.Unity.NetworkBehaviour.OnInputSourceLeft"> <member name="M:Netick.Unity.NetworkBehaviour.OnInputSourceLeft">
@@ -561,7 +573,6 @@
Initializes Netick. This is automatically called when you start Netick. Initializes Netick. This is automatically called when you start Netick.
<para>If you don't provide a <see cref="T:Netick.Unity.NetickConfig"/>, Netick will use the default config, which can be modified/found in (Netick -> Settings).</para> <para>If you don't provide a <see cref="T:Netick.Unity.NetickConfig"/>, Netick will use the default config, which can be modified/found in (Netick -> Settings).</para>
</summary> </summary>
<param name="transport"></param>
</member> </member>
<member name="M:Netick.Unity.Network.Shutdown(System.Boolean)"> <member name="M:Netick.Unity.Network.Shutdown(System.Boolean)">
<summary> <summary>
@@ -691,13 +702,6 @@
</summary> </summary>
<param name="sandbox"></param> <param name="sandbox"></param>
</member> </member>
<member name="M:Netick.Unity.NetworkEventsListener.OnClientSceneLoaded(Netick.Unity.NetworkSandbox,Netick.NetworkConnection)">
<summary>
Called on the server when a specific client finished loading the scene.
</summary>
<param name="sandbox"></param>
<param name="client"></param>
</member>
<member name="M:Netick.Unity.NetworkEventsListener.OnConnectedToServer(Netick.Unity.NetworkSandbox,Netick.NetworkConnection)"> <member name="M:Netick.Unity.NetworkEventsListener.OnConnectedToServer(Netick.Unity.NetworkSandbox,Netick.NetworkConnection)">
<summary> <summary>
Called on the client when connection to the server has been initiated. Called on the client when connection to the server has been initiated.

View File

@@ -1,6 +1,6 @@
{ {
"name": "com.karrar.netick", "name": "com.karrar.netick",
"version": "0.12.19", "version": "0.12.20",
"displayName": "Netick", "displayName": "Netick",
"description": "A networking solution for Unity", "description": "A networking solution for Unity",
"unity": "2021.3", "unity": "2021.3",