Change NetworkConnection.Scenes to use scene handles #729
Closed
celojevic
started this conversation in
Feature Request
Replies: 2 comments 2 replies
-
Before we go this route have you tried using an equality comparer on the
hash
set which uses the scene Id?
…On Mon, Jul 22, 2024, 7:26 PM gooby ***@***.***> wrote:
This is a breaking change. I've done some testing with this and it
requires just a few changes in the source to just use scene.handle
instead of Scene. It completely removes GC and saves a little performance.
Here's what it looks like before the change:
image.png (view on web)
<https://github.com/user-attachments/assets/f1167f20-ff77-4967-aca8-853d02d37e6d>
After:
image.png (view on web)
<https://github.com/user-attachments/assets/ab530c05-f24e-4712-809a-f684ce34faa7>
—
Reply to this email directly, view it on GitHub
<#729>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGPJC3SP5ZARFELQPAZLQPDZNWILTAVCNFSM6AAAAABLJHTVBSVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZWHE3DMMRVG4>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Since you already tested are you able to submit a PR? If you don't want to
just post your changes here please.
…On Mon, Jul 22, 2024, 7:59 PM gooby ***@***.***> wrote:
I just tried it, same performance gain, thanks for the idea :D
—
Reply to this email directly, view it on GitHub
<#729 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGPJC3UJPDCJUJOTQFE6HGDZNWMF7AVCNFSM6AAAAABLJHTVBSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMJSGAZDINQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is a breaking change. I've done some testing with this and it requires just a few changes in the source to just use


scene.handle
instead of Scene. It completely removes GC and saves a little performance. Here's what it looks like before the change:After:
People can still use the Unity SceneManager to get scenes by their handle.
Unity 2022 LTS
FN 3.11.7
Beta Was this translation helpful? Give feedback.
All reactions