Commit Graph

210 Commits

Author SHA1 Message Date
Karrar
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. 2025-05-15 08:42:14 +03:00
Karrar
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. 2025-05-15 04:59:53 +03:00
Karrar
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. 2025-05-13 14:08:11 +03:00
Karrar
6c88474657 Made a small change in how scene object ids are assigned. 2025-05-11 09:09:47 +03:00
Karrar
d442880219 Added GetPreviousNetworkUnorderedList to OnChangedData. 2025-05-10 08:58:27 +03:00
Karrar
b0bac5b95a Removed a call to GC.Collect when starting Netick. This was causing a big CPU spike at startup. 2025-05-08 22:29:40 +03:00
Karrar
6461a567ba Added NetworkObject.SetInitialProperties to set initial properties like Prediction Mode and Add To Network Loop. 2025-05-07 22:28:57 +03:00
Karrar
7cea3900f9 Fixed an issue with NetworkObject.SetStateFrom and NetworkBehaviour.SetStateFrom. 2025-05-05 21:59:50 +03:00
Karrar
6b095f9a3b Fixed an issue with NetickEngine.CopyWorldStateTo. 2025-05-05 17:42:26 +03:00
Karrar
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. 2025-05-04 23:13:15 +03:00
Karrar
7145c90159 Adding a testing change to debug an issue with a potential NetworkTransform. 2025-04-30 01:55:51 +03:00
Karrar
1ffceba53e Adding a testing change to debug an issue with a potential NetworkTransform. 2025-04-30 01:11:02 +03:00
Karrar
c1e4405850 Fixed an issue when unloading a scene that caused a null reference exception to be thrown in Netick.InterestManagement.ProcessGroup. 2025-04-30 00:22:45 +03:00
Karrar
08c839edf1 Read the description for detailed changes.
- Improved memory usage in the client.
- Added methods to simplify saving/loading a snapshot of the world's networked state.
- Fixed an issue with Interpolation Delay calculation.
2025-04-29 21:47:49 +03:00
Karrar
7eeb2ca1ce Changed NetworkObject.PrefabId to be public. 2025-04-20 08:09:22 +03:00
Karrar
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. 2025-04-08 00:32:48 +03:00
Karrar
e31eec5daa Added IncludeInactiveObjects to NetickConfig. Enabling this setting allows Netick to register inactive (disabled) network objects, network behaviours, and network event listeners. 2025-04-08 00:16:06 +03:00
Karrar
6118a98219 Changed PhysicsSimulationStep to use Sandbox.ScaledFixedDeltaTime instead of Sandbox.FixedDeltaTime to take Time.timeScale into account. 2025-04-07 18:29:05 +03:00
Karrar
ff8ea12efc Fixed a slight issue with calculating outgoing bandwidth. 2025-04-03 21:56:28 +03:00
Karrar
187cb86867 Fixed an issue causing auto-quantization to not work on structs that are defined outside a NetworkBehaviour class. 2025-03-26 13:04:56 +03:00
Karrar
5d7a60cb70 Fixed an issue with the new prefab system causing a Server sent bad data error in the client. 2025-03-26 04:39:51 +03:00
Karrar
bd6d5a22c9 Fixed not being able to set NetworkObject.InterestGroup to null. 2025-03-24 10:57:24 +03:00
Karrar
49a877f25d Fixed an issue with Sandbox.SimulatedLossOut causing it not to affect Sandbox.OutPacketLoss. 2025-03-24 07:44:48 +03:00
Karrar
8a83c3d05b Fixed an issue with Sandbox. NetworkInstantiate<T> causing a stack overflow. 2025-03-24 00:14:36 +03:00
Karrar
b599622b1c Fixed a small issue with the previous commit. 2025-03-22 22:04:30 +03:00
Karrar
b1090b8ab2 Fixed an issue where nested network objects of persistent objects get unlinked when changing scenes. 2025-03-22 21:57:55 +03:00
Karrar
87e4653a01 Fixed an issue with persistent network prefabs. 2025-03-22 20:49:49 +03:00
Karrar
5f8afcdf7a Changed Prefab Fetch Mode to Auto Get Prefabs. 2025-03-22 07:53:55 +03:00
Karrar
8a28181a82 Rewritten the network prefab runtime and editor systems from scratch. Now it should be less error-prone, more capable (ability to choose prefabs location, ability to select prefabs manually, and ability to provide a prefab list at runtime before starting Netick), and more performant (at editor time). In addition, Netick will no longer make any changes on prefabs at editor time, so you shouldn't see any changes on git anymore on prefabs. In addition, misconfigured prefab ids will no longer be a problem, because they are set at runtime instead of editor time. 2025-03-20 01:38:57 +03:00
Karrar
b95e68a568 Fixed an issue causing the client not to send redundant inputs. 2025-03-19 22:26:23 +03:00
Karrar
35b22d89c8 Updated images in README.md. 2025-03-13 11:12:38 +03:00
Karrar
01fcd6547b Updated AddressableSceneOperation to fit the previous change. 2025-03-12 03:54:23 +03:00
Karrar
d8021a33b4 Changed NetworkSceneHandler.LoadBuildSceneAsync and NetworkSceneHandler.UnloadBuildSceneAsync to return ISceneOperation instead of UnityEngine.AsyncOperation. 2025-03-12 03:51:27 +03:00
Karrar
31d97490ff Moved Netick menu to Tools. 2025-03-11 07:24:46 +03:00
Karrar
ae40087bef Added support for custom scene handling, in addition to an addressable scene handler. 2025-03-11 07:05:45 +03:00
Karrar
c5ebb22afd Made a small change to PlayerSpawner in how the spawn position is calculated. 2025-03-01 01:44:32 +03:00
Karrar
79fcfc17ff Changed OnPlayerDisconnected/OnClientDisconnected to invoke after the player/client was removed from Sandbox.ConnectedPlayers/Sandbox.ConnectedClients. 2025-02-28 23:32:09 +03:00
Karrar
f56df7fc48 Moved PlayerSpawner to Netick.Samples namespace. 2025-02-28 21:25:08 +03:00
Karrar
33f4c44d51 Removed a testing log. 2025-02-28 04:22:47 +03:00
Karrar
6d0f3be204 Changed shutdown behaviour to despawn pending destroyed objects when shutting down. 2025-02-28 00:46:53 +03:00
Karrar
b21cb08db4 Added PlayerSpawner, a helper script for quick prototyping, used to spawn/despawn a player prefab when a player (client or host) has connected/disconnected. 2025-02-28 00:28:53 +03:00
Karrar
a7d3032518 Fixed an issue with calculating LagCompHit.Normal/LagCompHit2D.Normal of a raycast on rotated sphere HitShapes. 2025-02-27 23:07:43 +03:00
Karrar
661cbc1355 Fixed an issue with calculating normal vector of LagCompHit/LagCompHit2D. 2025-02-26 17:53:29 +03:00
Karrar
1a16d85152 Changed NetworkBehaviour.StateSize to be virtual. 2025-02-25 01:13:15 +03:00
Karrar
5cd72b10fe Changed CopyStateTo, SetStateFrom, and ClearState methods of NetworkBehaviour to be virtual. 2025-02-23 19:12:11 +03:00
Karrar
c89837d8a8 Fixed an issue where the client resets Sandbox.AuthoritativeTick before invoking OnConnectedToServer. 2025-02-22 10:55:31 +03:00
Karrar
01cf00257b Fixed an issue with HitShape.Raycast always returning false. 2025-02-21 09:05:06 +03:00
Karrar
4622c857ed Fixed an issue with NetworkObjectRef.IsValid and NetworkBehaviourRef.IsValid returning true for invalid id (-1). 2025-02-21 09:00:29 +03:00
Karrar
f3b3c047b1 Added HitShape.Raycast. Works the same as Collider.Raycast of Unity, but for HitShapes. 2025-02-19 05:34:26 +03:00
Karrar
291366479e Fixed a race condition causing a null reference exception to be thrown in the client when using IM on objects existing on an additively loaded scene. 2025-02-05 22:55:35 +03:00