Skip to content

Fixed NetworkCollider bug to allow for comparisons between current tick and last tick stored sets#1041

Open
strakerak wants to merge 2 commits into
FirstGearGames:mainfrom
strakerak:main
Open

Fixed NetworkCollider bug to allow for comparisons between current tick and last tick stored sets#1041
strakerak wants to merge 2 commits into
FirstGearGames:mainfrom
strakerak:main

Conversation

@strakerak
Copy link
Copy Markdown

From the 4.7.2 update, the IL2CPP code was added while checking if lastTick was not unsetLastTick (max value). If this condition passed, localTick would be removed from the _enteredColliders HashSet. However, this is ran after adding everything to localtick, so it would render that entire entry useless.

Whenever it would check for LastEnteredColliders in either method, it would resolve to Null as there is no entry in the HashSet from the lastTick, ONLY the current localTick can be accessed within that code snippet.

So anytime that code snippet is ran, it would always resolve to OnEnters, but no OnStays or OnExits.

Changing it from localTick back to lastTick (as it was changed to localTick in the recent update) fixed this, and now both OnStays and OnExits are called.

Found when entering a platform on my game, and it kept me as a parent even though I ran far away from it, nothing in OnExit would be called, and I thought it wasn't subscribing at first. Turns out it was just an access issue for comparisons.

Long description because reading through the entire code allows me to understand more about how it works on the Networking Side, it's a lot of fun!

strakerak added 2 commits May 15, 2026 16:37
Changed localTick to lastTick for removal after collider comparisons are run. If removing localTick, lastTick cannot be found or accessed, hence removing any ability to run comparisons.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant