From 7e3a31bf9408cd53c0dcf3ec55d8b9cb76952b7c Mon Sep 17 00:00:00 2001 From: Karrar Date: Fri, 23 Aug 2024 06:05:14 +0300 Subject: [PATCH] Added `NetworkSandbox.InPacketLoss`, `NetworkSandbox.OutPacketLoss`, `NetworkConnection.InPacketLoss`, and `NetworkSandbox.OutPacketLoss`. These are measurements for inward and outward packet loss. --- Netick/Editor/Netick.Unity.Editor.dll | Bin 61952 -> 61952 bytes Netick/Editor/Netick.Unity.Pro.Editor.dll | Bin 8192 -> 8192 bytes Netick/Editor/Unity.Netick.CodeGen.dll | Bin 22528 -> 22528 bytes Netick/Runtime/Netick.Unity.Pro.dll | Bin 16896 -> 16896 bytes Netick/Runtime/Netick.Unity.dll | Bin 132608 -> 132608 bytes Netick/Runtime/Netick.Unity.xml | 126 +++++++++++----------- package.json | 2 +- 7 files changed, 66 insertions(+), 62 deletions(-) diff --git a/Netick/Editor/Netick.Unity.Editor.dll b/Netick/Editor/Netick.Unity.Editor.dll index 62407d1d4ebc206863db075e2d5ea0769a2dfa4d..8f84486aeda247fd71d53004e8c6e786762dd241 100644 GIT binary patch delta 125 zcmZp8!rbtLc|r$E(-z?$8+%^vW;S9l*j%w^GZUDhw|^azz?8%6Hka3Jaa_aoUHO%T zsQu@G$5TttbbN;y4 R+r0Tz?2|8Up8GhN4*<*AISBv& delta 125 zcmZp8!rbtLc|r$E@fPPr8+%^vW;SH7++49|GZUDhw|^azz`dU{%IX_-yKN~k>@YmK zL}T-tgF6&hPER!7J9)*U0D+b@y)Q0s-}CP<++O7~O}20{$Kz53sGz(DR1m1zHtwdw T4#5S9kHY#NP2D{AaWWqOX?8o~ diff --git a/Netick/Editor/Netick.Unity.Pro.Editor.dll b/Netick/Editor/Netick.Unity.Pro.Editor.dll index 26a1bb12d969fe6fcc7369953c112ea7da73666d..7f25f45888d37348612165f212c737553fd5849a 100644 GIT binary patch delta 105 zcmZp0XmFU&!SZMK;U^n=CI|`KJMrh`O`kHKt}DAzJ+s%CZ`Kjs!NjtA%KmecUx)?> z6lksSv~gPE+|e~NA@@-7qsbm(l?qV7W|$yI^@m2D=|3zt?%WYQdD7;GV)C2--Q+Ye delta 105 zcmZp0XmFU&!SbS>_4>x12|@z4mlkfG^1XaY6@6=a-hB8+&401uk8FQ`UNaz0;N^ThZC_#@3sExXxf_Idt0U#^fo! z0Rk5Tr!Mqpy5KVL>*=HKVi&KU{KdCS0V;Sz5Gn{#eX-JM;SBLBn=dNJ{oLH;SH=kd DsJb}G delta 107 zcmZqJz}T>XaY6^nz5R#gZS0A06*v%i_0>@;BiB{Wy(HqKZ>n$p;W~qzMSaiZFO#SE z1_8+(oz32^w#x8zm)=RIYwlGBVE3=20W7&ox81lO-zIr)i2 zfB>&GOBvg;-45G&C+)ptJ8Q~h7t10AsNjS$s31_arqb!n+lzWmUkPoiTD|$2r4|PO DvqvwA delta 107 zcmZo@VQgq&oY2AYd`H28jXg(<1Y%ClC}`H)@3E1u<*y{q{S*hs@UNPn=Kt;uWK}A98{~NSC UP&)0nK+yEi((QV$881lz0Cs&k9RL6T delta 124 zcmZqZ;b`dLn9#wJ^ucdIW6#zeMw4vQ6keUa;1y$@0#tO@3#ceiec10M V!oCdL;blGZ3NLQgd(C)B3II~WJf#2t diff --git a/Netick/Runtime/Netick.Unity.xml b/Netick/Runtime/Netick.Unity.xml index dbeea79..4d192db 100644 --- a/Netick/Runtime/Netick.Unity.xml +++ b/Netick/Runtime/Netick.Unity.xml @@ -9,55 +9,6 @@ This component is used to replicate the position and rotation of an object. Therefore, it’s 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. - - - 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. - Note: this method should only be called on , in other words, just after Netick has been started. - - Prefab to enable pooling for. - How many instances to be preloaded. - Pass true to hide inactive pool members. - - - - Gets a Network Prefab by name. - Note: this causes GC. - - - The Network Prefab - - - - Instantiates a prefab. This must be called instead of or its variations. - Note: this must be called only for non-networked prefabs. If you want to instantiate a network prefab, use instead. - - The prefab to be instantiated. - Position of the instantiated object. - Rotation of the instantiated object. - - - - - Instantiates a network prefab. - 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. - Note: make sure the prefab has been registered. - Note: the specified input source will be given to every child of this prefab. - - The prefab to be instantiated. - Position of the instantiated object. - Rotation of the instantiated object. - Input source of the instantiated object. - - - - /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// - - Destroys a network object. Only call this on the server or on the client for spawn-predicted objects which have -1 Ids. - Note: never call this on a child of the original prefab, only the root of the prefab. - - The object to destroy. - - Use this to enable/disable Physics Prediction in the client at runtime. @@ -142,9 +93,7 @@ - A list containing all simulated/registered network objects [] currently. - - Note: to get a network object by id, use: + A dictionary containing all simulated/registered network objects [] currently. @@ -191,6 +140,16 @@ Outgoing data in kilobytes per second (KBps). + + + [Client Only] 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. + + + + + [Client Only] 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. + + [Client Only] Interpolation delay in seconds. @@ -321,6 +280,54 @@ [Server Only] Unloads a scene asynchronously. + + + 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. + Note: this method should only be called on , in other words, just after Netick has been started. + + Prefab to enable pooling for. + How many instances to be preloaded. + Pass true to hide inactive pool members. + + + + Gets a Network Prefab by name. + Note: this causes GC. + + + The Network Prefab + + + + Instantiates a prefab. This must be called instead of or its variations. + Note: this must be called only for non-networked prefabs. If you want to instantiate a network prefab, use instead. + + The prefab to be instantiated. + Position of the instantiated object. + Rotation of the instantiated object. + + + + + [Server Only] Instantiates a network prefab. + This must only be called on the server, since only the server can instantiate network prefabs. + Note: make sure the prefab has been registered. + Note: the specified input source will be given to every child of this prefab. + + The prefab to be instantiated. + Position of the instantiated object. + Rotation of the instantiated object. + Input source of the instantiated object. + + + + + [Server Only] Destroys a network object. + Note: never call this on a child of the original prefab, only the root of the prefab. + + The object to destroy. + + A networked array. @@ -533,7 +540,12 @@ - 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). + + + + + 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). @@ -561,7 +573,6 @@ Initializes Netick. This is automatically called when you start Netick. If you don't provide a , Netick will use the default config, which can be modified/found in (Netick -> Settings). - @@ -691,13 +702,6 @@ - - - Called on the server when a specific client finished loading the scene. - - - - Called on the client when connection to the server has been initiated. diff --git a/package.json b/package.json index 2708d09..4dc98fb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.karrar.netick", - "version": "0.12.19", + "version": "0.12.20", "displayName": "Netick", "description": "A networking solution for Unity", "unity": "2021.3",