Commit Graph

  • 17a862ccc2 Fix: NetworkHashSet.Add now works as expected master Karrar 2025-10-01 16:18:29 +03:00
  • c723726f4b Fix: NetworkBehaviour.FetchInput stack overflow Karrar 2025-09-30 17:14:11 +03:00
  • 392d62feb6 Fix: stack overflow in Simulation.FetchInputFor Karrar 2025-09-30 16:53:04 +03:00
  • cd1010c573 Add: Simulation.FetchInputFor to fetch inputs for a specific player on the server Karrar 2025-09-30 13:41:49 +03:00
  • bd3941b8b8 Fix: remove harmless error when starting Netick on macOS and iOS Karrar 2025-09-23 14:03:03 +03:00
  • 41e0615f8b Fix: NetworkAwake invoked twice on network behaviours of sandbox object on client Karrar 2025-09-23 14:01:59 +03:00
  • 634cc38991 Add: automatically add a define for NETICK scripting symbol Karrar 2025-09-14 21:30:01 +03:00
  • 558dbe3e4b Fix: visual jitter when calling NetworkTransform.Teleport on the client Karrar 2025-09-12 17:33:57 +03:00
  • eb81273310 Fix: OnPlayerLeft invoked incorrectly on client when it disconnects and connects again Karrar 2025-09-01 10:36:27 +03:00
  • 2bc38f5767 Fix: OnDisconnectedFromServer not invoked when the client disconnects locally Karrar 2025-09-01 04:59:16 +03:00
  • 8e1a2377b7 Fix: codegen not running on a script that involves cross-assembly inheritance, where the script inherits another script (of another assembly) that does not directly inherit NetworkBehaviour. Karrar 2025-08-30 04:21:54 +03:00
  • 963a0d4858 Fix: prevent stack overflow in Angle implicit float conversion operator Karrar 2025-08-28 14:12:34 +03:00
  • ca99e9d75f Fix: player join/leave callbacks not triggered if multiple packets from different ticks are received before the client processes them Karrar 2025-08-26 19:18:43 +03:00
  • b2a77104c3 Add: validation and error logging for oversized RPCs and tick budget overflows Karrar 2025-08-26 03:05:33 +03:00
  • 07ca42b0c8 Fix: NetworkObject being incorrectly set as active in the server after it was disabled in Network Awake Karrar 2025-08-25 04:01:52 +03:00
  • 32dd3cd077 Fix: Resolve an issue where rapidly adding/removing a client’s interest in an object, while also rapidly switching the object's input source between the client and null, could result in the object not being able to resimulate in the future when interest is added again and the client is reassigned as the input source Karrar 2025-08-18 23:50:37 +03:00
  • 226a4f2609 Fix: Resolve an exception when restarting Netick after Network.ShutdownImmediately Karrar 2025-08-18 19:31:41 +03:00
  • 0843f02c15 Fix: Resolve an exception in the server when reaching Max Players in server mode Karrar 2025-08-14 00:42:46 +03:00
  • 7b0669ed1a Fix: Handled negative hash codes in NetworkDictionary and NetworkHashSet Karrar 2025-08-13 12:29:01 +03:00
  • 34214548a6 Changed Sandbox.AuthoritativeTick to only update when a tick runs, instead of when a packet is received. Karrar 2025-08-12 18:22:44 +03:00
  • f446fa12bb Fixed a rare exception in the client when a network object is created or destroyed in NetworkDestroy in the server. Karrar 2025-08-07 15:35:17 +03:00
  • 39f61a4d7f Fixed an issue where a newly spawned object may not be fully initialized and still sent to the client, causing undefined behaviour. Karrar 2025-08-06 17:49:56 +03:00
  • 1ec39d8069 Fixed an issue with Sandbox.NetworkInstantiate when called during OnPlayerJoined or OnPlayerLeft. Karrar 2025-08-06 11:52:21 +03:00
  • a73b60190f Added basic detection for client-server mismatches. Karrar 2025-08-06 11:04:15 +03:00
  • 0feb217ced Added a note in the inspector for NetworkObjectRef and NetworkBehaviourRef properties when Netick hasn't started yet. Karrar 2025-08-05 11:15:18 +03:00
  • 8db8713ba4 Added inspector support for showing a clickable reference to the object or behaviour referenced by NetworkObjectRef or NetworkBehaviourRef. Karrar 2025-08-05 11:04:45 +03:00
  • e03d89ebb6 Fixed a codegen issue with Angle, causing it not to auto-interpolate in NetworkRender. Karrar 2025-08-04 12:01:47 +03:00
  • f3b34bee4e Added Angle type. This is a helper struct that represents an angle in degrees, which automatically wraps to [0, 360) range. This type supports automatic interpolation. Karrar 2025-08-04 11:57:18 +03:00
  • 5f7ebf8797 Added [Serializable] attribute to NetworkBehaviourRef and NetworkObjectRef. Karrar 2025-08-04 11:00:39 +03:00
  • a2fd447d1a Fixed potential misprediction-like behavior on high-ping connections when joining and immediately performing actions (e.g., moving the player). And overall, improved general CSP behavior for high-ping clients when they first join. Karrar 2025-08-04 10:55:24 +03:00
  • a8fed34b90 Added try-catch around several callback invocations (e.g., NetworkAwake) to prevent exceptions in one from causing undefined behaviour. Karrar 2025-08-02 08:20:54 +03:00
  • aa7e9e54a8 Added several more overloads for Sandbox.LocalInstantiate. Karrar 2025-08-02 06:24:50 +03:00
  • 0c18adc7c9 Added Sandbox.LocalInstantiate to replace Sandbox.Instantiate, which was frequently misused in place of Sandbox.NetworkInstantiate for spawning networked prefabs. Karrar 2025-08-02 06:12:58 +03:00
  • 75b8635804 Fixed an issue with SetEnabled extension method, causing it to disable an object when it's called in NetworkStart. Karrar 2025-07-31 22:04:34 +03:00
  • 7cde5340e7 Fixed an issue with Narrow Phase Filtering that causes Input Source objects to not sync to the Input Source client. Karrar 2025-07-31 18:32:53 +03:00
  • e90c1d6533 Improved bandwidth usage when using Narrow Phase Filtering. Karrar 2025-07-30 11:36:32 +03:00
  • a5c7bef946 Changed the size of LiteNetLibTransport._connectionBytes to be 1000. Karrar 2025-07-30 05:59:14 +03:00
  • f449244367 Fixed an issue where invoking an RPC on the server from within another RPC (originally invoked by a client) could prevent the new RPC from being delivered to the source client, even if it was correctly scoped to them. Karrar 2025-07-28 16:10:55 +03:00
  • 97ee05413c Added codegen errors for the use of generic type parameters as network properties or RPC parameters. Karrar 2025-07-26 11:40:14 +03:00
  • 0d6fcba6d7 Fixed an issue where the previous snapshot of a network collection could be incorrect. Also fixed a bug in NetworkDictionary and NetworkHashSet where key existence checks and value retrievals could fail, despite the key being present. Karrar 2025-07-25 19:07:23 +03:00
  • a77b5a2b9c Added SyncTransformOnSpawn to NetickConfig. This setting, enabled by default, controls whether the initial position and rotation of spawned objects are synchronized at spawn time. Disabling it can help reduce bandwidth usage or serve as an information-hiding measure. Karrar 2025-07-24 01:34:45 +03:00
  • 55c8cd5b54 Added an optional predicate parameter to lag compensation queries to allow custom filtering of potential containers during the broadphase stage, improving control over query results. Karrar 2025-07-23 00:47:51 +03:00
  • 758b073942 Fixed Netick throwing an exception on the client when an object's parent was changed without using NetworkObject.SetParent. Karrar 2025-07-22 19:41:57 +03:00
  • a637c9fc92 Fixed an issue with the previous commit. Karrar 2025-07-22 06:06:11 +03:00
  • 4d97886a3c Changed NetworkObject.Id to return -1 when the object is spawned but the client is not interested in it and hasn't yet received any state for it. Karrar 2025-07-22 01:09:40 +03:00
  • 3ece834de2 Changed NetworkAwake (in the client) to invoke after the object state has been applied. Karrar 2025-07-21 00:08:08 +03:00
  • 54e7f6d8ed Updated XML documentation. Karrar 2025-07-20 19:23:21 +03:00
  • 681f67c135 Fixed an exception on startup when a NetickBehaviour is present on the sandbox prefab. Karrar 2025-07-19 19:18:45 +03:00
  • 5f77e7b394 Added IsMarkedForDestruction to NetworkObject. This flag returns true if Sandbox.Destroy has been invoked on an object in the server, and the object is scheduled to be removed from the simulation (destroyed) at the end of the current tick. Karrar 2025-07-19 00:07:24 +03:00
  • 823fbb5e53 Fixed an issue with static RPCs with RpcPeers.Owner target, which are invoked by the owner/server. Karrar 2025-07-17 17:41:45 +03:00
  • 6f63dc3b1a Fixed an issue with static RPCs with RpcPeers.Owner source. Karrar 2025-07-17 17:29:38 +03:00
  • 276dcb2a65 Fixed an issue when changing the networked state of objects in an additive scene that is being unloaded, causing spawned objects in the future not to sync. Karrar 2025-07-17 02:49:46 +03:00
  • d405291150 Added IsInterested to NetworkObject and NetworkBehaviour. On the client, it returns true if this client is interested in this object. On the server, it always returns true. Karrar 2025-07-16 23:51:02 +03:00
  • d73fc09caa Fixed an issue with NetworkBehaviour.IsPredicted returning false in NetworkAwake for predicted objects. Karrar 2025-07-16 23:20:01 +03:00
  • dd1274a9ca Changed the syncing logic of a network object's parent to prevent null reference exceptions when the user sets the object's parent to null using transform.parent or transform.SetParent (instead of NetworkObject.SetParent), and the previous parent is later destroyed. Karrar 2025-07-16 17:59:39 +03:00
  • 63fabfadda Fixed an issue where targeted RPCs with target: RpcPeers.Everyone were not invoked on the target player if the caller was the target player. Karrar 2025-07-16 01:14:06 +03:00
  • 035bc58c2b Fixed issue with accessing Length getter of Network Array Structs. Karrar 2025-07-16 00:14:49 +03:00
  • d67e299b44 Fixed a code gen issue with static RPCs with no serializable parameters. Karrar 2025-07-16 00:08:55 +03:00
  • e0b6616f93 Fixed a codegen issue with Guid type. Karrar 2025-07-09 14:23:18 +03:00
  • cccdbffd65 Fixed a null reference exception in Sandbox.SetPlayerObject when passed a null player object. Karrar 2025-07-09 07:13:48 +03:00
  • f6ea3fd0f6 Added Sandbox.GetBehavioursOfType to performantly get all scripts (in the simulation) of a specific type. Karrar 2025-07-08 15:43:01 +03:00
  • 3e235a3bf6 Changed Sandbox.GetPlayerObject to return null gracefully when no object is associated with a player, instead of throwing an exception. Karrar 2025-07-07 18:00:33 +03:00
  • 49f7867cd7 Added RaycastAll extension methods for PhysicsScene and PhysicsScene2D. These extensions wrap Raycast overloads that populate a hits array, offering a more intuitive alternative to Unity's inconsistently named methods. Karrar 2025-07-07 15:09:27 +03:00
  • 864f003677 Fixed code gen issue for RPC methods where the only parameter is RpcContext. Karrar 2025-07-07 14:44:25 +03:00
  • 53ddf149e1 Added support for targeted RPCs and optional RpcContext parameter Karrar 2025-07-05 16:39:49 +03:00
  • 466c31df64 Added Vector2ErrorCorrector and FloatErrorCorrector types for smoothly correcting prediction errors. Karrar 2025-07-02 01:48:15 +03:00
  • e19a418de5 Changed Sandbox.GetPlayerFromId to Sandbox.GetPlayerById. Karrar 2025-06-30 04:37:17 +03:00
  • 9f31f4f16c Fixed an issue in code gen where non-networked properties within structs marked with [Networked] were being incorrectly modified, leading to code gen errors. Karrar 2025-06-28 23:23:16 +03:00
  • 88832b2723 Separated core LiteNetLib wrapper logic into LiteNetLibTransport.cs. LiteNetLibTransportProvider.cs now exclusively contains the LiteNetLibTransportProvider class to address Unity Editor-related issues. Karrar 2025-06-28 04:36:16 +03:00
  • 07feb115b3 Added a warning for [Networked] structs when float-quantizable members (e.g., float, Vector2, Vector3) are declared as fields instead of properties. Karrar 2025-06-28 04:23:33 +03:00
  • 40b7deedb7 Deleted ~Samples. Karrar 2025-06-27 21:50:45 +03:00
  • a128b527ed Fixed an issue where some clients did not receive data from the server when multithreading was enabled and the number of connected clients was odd. Karrar 2025-06-27 07:21:06 +03:00
  • 1b0d33d8f0 Read the description for detailed changes. Karrar 2025-06-27 05:47:00 +03:00
  • 8e2db0f357 Fixed an issue where multiple keys with identical hash codes caused undefined behavior in NetworkDictionary and NetworkHashset. Karrar 2025-06-14 18:10:49 +03:00
  • fb0bb8ba67 Improved Prediction Error Correction Smoothing by changing the correction method. Karrar 2025-06-14 18:10:08 +03:00
  • 5d7ebde5e1 Fixed showing the reversed icon for the folding state of the sandbox element in the Sandboxes tab of Netick window. Karrar 2025-06-08 15:29:22 +03:00
  • 0ec3babf0d Added the sandbox name next to the scene name in the hierarchy UI in the editor. Karrar 2025-06-06 15:55:42 +03:00
  • 49a8a05b2a Added Accurate Local Interpolation to Netick Config. By default, Netick uses the predicted (and thus potentially inaccurate) From snapshot for local interpolation even after rollback & resims, which results in basic smoothing over prediction errors. However, enable this if you want to always use the reconciled From snapshot. Karrar 2025-05-28 19:38:00 +03:00
  • e13c8efacf Added Head and Tail properties and GetNode method to NetworkLinkedListSnapshot to make performing a traditional linked list iteration easier. Karrar 2025-05-24 14:21:35 +03:00
  • 4a8d3b76c9 Improved Remote Interpolation buffering in the client. Now, it should adjust faster when network conditions improve. In addition, added Extra Interpolation Delay to Netick Config, which determines the amount of extra remote interpolation delay/buffering added in the client, regardless of connection quality. This is a value between 0 and 1, where 1 is equivalent to one send tick worth of delay/buffering. Karrar 2025-05-18 12:33:51 +03:00
  • 0f873217c8 Fixed an issue that, sometimes, caused an exception to be thrown in NetworkBehaviour.InternalReset at runtime after changing the size of a network array at editor/codegen time. Karrar 2025-05-15 08:42:14 +03:00
  • cea642e073 Fixed an issue with scene network objects in additive scenes not being added to the simulation by Netick, which was caused by the previous change. Karrar 2025-05-15 04:59:53 +03:00
  • b9a2e60966 Changed how the Scene Id of scene network objects is assigned. Now, it's only set once when the object is first created. And it's no longer an ascending value, it's a unique (within the object's scene) random value in the range of int.MinValue and int.MaxValue, excluding -1, which is used as the invalid id. The ascending id still exists, but now is called Runtime Scene Id, and it's only set at runtime and used internally by Netick. Karrar 2025-05-13 14:08:11 +03:00
  • 6c88474657 Made a small change in how scene object ids are assigned. Karrar 2025-05-11 09:09:47 +03:00
  • d442880219 Added GetPreviousNetworkUnorderedList to OnChangedData. Karrar 2025-05-10 08:58:27 +03:00
  • b0bac5b95a Removed a call to GC.Collect when starting Netick. This was causing a big CPU spike at startup. Karrar 2025-05-08 22:29:40 +03:00
  • 6461a567ba Added NetworkObject.SetInitialProperties to set initial properties like Prediction Mode and Add To Network Loop. Karrar 2025-05-07 22:28:57 +03:00
  • 7cea3900f9 Fixed an issue with NetworkObject.SetStateFrom and NetworkBehaviour.SetStateFrom. Karrar 2025-05-05 21:59:50 +03:00
  • 6b095f9a3b Fixed an issue with NetickEngine.CopyWorldStateTo. Karrar 2025-05-05 17:42:26 +03:00
  • 70f8395422 Fixed an issue with clearing the networked state memory of newly spawned network objects, which was causing the values of the networked state of previously destroyed objects to show in the newly spawned objects. Karrar 2025-05-04 23:13:15 +03:00
  • 7145c90159 Adding a testing change to debug an issue with a potential NetworkTransform. Karrar 2025-04-30 01:55:51 +03:00
  • 1ffceba53e Adding a testing change to debug an issue with a potential NetworkTransform. Karrar 2025-04-30 01:11:02 +03:00
  • c1e4405850 Fixed an issue when unloading a scene that caused a null reference exception to be thrown in Netick.InterestManagement.ProcessGroup. Karrar 2025-04-30 00:22:45 +03:00
  • 08c839edf1 Read the description for detailed changes. Karrar 2025-04-29 21:47:49 +03:00
  • 7eeb2ca1ce Changed NetworkObject.PrefabId to be public. Karrar 2025-04-20 08:09:22 +03:00
  • 116eea8247 Changed NetworkDictionary indexer setter behaviour to add a new element with the specified key when the key was not found in the dictionary instead of throwing an exception. Karrar 2025-04-08 00:32:48 +03:00
  • e31eec5daa Added IncludeInactiveObjects to NetickConfig. Enabling this setting allows Netick to register inactive (disabled) network objects, network behaviours, and network event listeners. Karrar 2025-04-08 00:16:06 +03:00
  • 6118a98219 Changed PhysicsSimulationStep to use Sandbox.ScaledFixedDeltaTime instead of Sandbox.FixedDeltaTime to take Time.timeScale into account. Karrar 2025-04-07 18:29:05 +03:00
  • ff8ea12efc Fixed a slight issue with calculating outgoing bandwidth. Karrar 2025-04-03 21:56:28 +03:00
  • 187cb86867 Fixed an issue causing auto-quantization to not work on structs that are defined outside a NetworkBehaviour class. Karrar 2025-03-26 13:04:56 +03:00