Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: NetworkSceneChecker use Scene instead of string name #1496

Merged
merged 2 commits into from
Feb 15, 2020

Conversation

MrGadget1024
Copy link
Collaborator

@MrGadget1024 MrGadget1024 commented Feb 13, 2020

Use Scene instead of scene name because additive subscenes may be loaded at once and the name won't be unique.

@miwarnec
Copy link
Collaborator

why is this better?

@MrGadget1024
Copy link
Collaborator Author

why is this better?

Because scene name is not unique when loading the same additive multiple times, while the Scene itself is a unique instance.

@miwarnec
Copy link
Collaborator

miwarnec commented Feb 14, 2020

why is this better?

Because scene name is not unique when loading the same additive multiple times, while the Scene itself is a unique instance.

sounds like this would be worth a comment in the code. it's not obvious now, even less so 5 years from now :)

@MrGadget1024
Copy link
Collaborator Author

@vis2k Done

@miwarnec miwarnec merged commit 7bb80e3 into master Feb 15, 2020
@miwarnec miwarnec deleted the Improve-NetworkSceneChecker branch February 15, 2020 07:32
github-actions bot referenced this pull request in MirageNet/Mirage Feb 27, 2020
# [11.1.0](11.0.0-master...11.1.0-master) (2020-02-27)

### Bug Fixes

* Add missing channelId to NetworkConnectionToClient.Send calls ([#1509](https://github.com/MirrorNG/MirrorNG/issues/1509)) ([b8bcd9a](b8bcd9a))
* build in IL2CPP ([#1524](https://github.com/MirrorNG/MirrorNG/issues/1524)) ([59faa81](59faa81)), closes [#1519](https://github.com/MirrorNG/MirrorNG/issues/1519) [#1520](https://github.com/MirrorNG/MirrorNG/issues/1520)
* Fixed NetworkRoomManager Template ([1662c5a](1662c5a))
* Fixed toc link ([3a0c7fb](3a0c7fb))
* Host Player Ready Race Condition ([#1498](https://github.com/MirrorNG/MirrorNG/issues/1498)) ([4c4a52b](4c4a52b))
* NetworkIdentity.SetClientOwner: overwriting the owner was still possible even though it shouldn't be. all caller functions double check and return early if it already has an owner, so we should do the same here. ([548db52](548db52))
* NetworkServer.SpawnObjects: return false if server isn't running ([d4d524d](d4d524d))
* properly detect NT rotation ([#1516](https://github.com/MirrorNG/MirrorNG/issues/1516)) ([f0a993c](f0a993c))
* return & continue on separate line ([#1504](https://github.com/MirrorNG/MirrorNG/issues/1504)) ([61fdd89](61fdd89))
* Room example to use new override ([e1d1d41](e1d1d41))
* SendToAll sends to that exact connection if it is detected as local connection, instead of falling back to the .localConnection field which might be something completely different. ([4b90aaf](4b90aaf))
* SendToObservers sends to that exact connection if it is detected as local connection, instead of falling back to the .localConnection field which might be something completely different. ([4267983](4267983))
* SendToReady sends to that exact connection if it is detected as local connection, instead of falling back to the .localConnection field which might be something completely different. ([4596b19](4596b19))

### Features

* Added NetworkConnection to OnRoomServerSceneLoadedForPlayer ([b5dfcf4](b5dfcf4))
* Check for client authority in CmdClientToServerSync ([#1500](https://github.com/MirrorNG/MirrorNG/issues/1500)) ([8b359ff](8b359ff))
* Check for client authority in NetworkAnimator Cmd's ([#1501](https://github.com/MirrorNG/MirrorNG/issues/1501)) ([ecc0659](ecc0659))
* Cosmetic Enhancement of Network Manager ([#1512](https://github.com/MirrorNG/MirrorNG/issues/1512)) ([f53b12b](f53b12b))
* NetworkSceneChecker use Scene instead of string name ([#1496](https://github.com/MirrorNG/MirrorNG/issues/1496)) ([7bb80e3](7bb80e3))
github-actions bot referenced this pull request in MirageNet/Mirage Feb 27, 2020
* NetworkSceneChecker use Scene instead of string name

* Added comment
github-actions bot referenced this pull request in MirageNet/Mirage Feb 27, 2020
# [11.1.0](11.0.0-master...11.1.0-master) (2020-02-27)

### Bug Fixes

* Add missing channelId to NetworkConnectionToClient.Send calls ([#1509](https://github.com/MirrorNG/MirrorNG/issues/1509)) ([b8bcd9a](b8bcd9a))
* build in IL2CPP ([#1524](https://github.com/MirrorNG/MirrorNG/issues/1524)) ([59faa81](59faa81)), closes [#1519](https://github.com/MirrorNG/MirrorNG/issues/1519) [#1520](https://github.com/MirrorNG/MirrorNG/issues/1520)
* Fixed NetworkRoomManager Template ([1662c5a](1662c5a))
* Fixed toc link ([3a0c7fb](3a0c7fb))
* Host Player Ready Race Condition ([#1498](https://github.com/MirrorNG/MirrorNG/issues/1498)) ([4c4a52b](4c4a52b))
* NetworkIdentity.SetClientOwner: overwriting the owner was still possible even though it shouldn't be. all caller functions double check and return early if it already has an owner, so we should do the same here. ([548db52](548db52))
* NetworkServer.SpawnObjects: return false if server isn't running ([d4d524d](d4d524d))
* properly detect NT rotation ([#1516](https://github.com/MirrorNG/MirrorNG/issues/1516)) ([f0a993c](f0a993c))
* return & continue on separate line ([#1504](https://github.com/MirrorNG/MirrorNG/issues/1504)) ([61fdd89](61fdd89))
* Room example to use new override ([e1d1d41](e1d1d41))
* SendToAll sends to that exact connection if it is detected as local connection, instead of falling back to the .localConnection field which might be something completely different. ([4b90aaf](4b90aaf))
* SendToObservers sends to that exact connection if it is detected as local connection, instead of falling back to the .localConnection field which might be something completely different. ([4267983](4267983))
* SendToReady sends to that exact connection if it is detected as local connection, instead of falling back to the .localConnection field which might be something completely different. ([4596b19](4596b19))

### Features

* Added NetworkConnection to OnRoomServerSceneLoadedForPlayer ([b5dfcf4](b5dfcf4))
* Check for client authority in CmdClientToServerSync ([#1500](https://github.com/MirrorNG/MirrorNG/issues/1500)) ([8b359ff](8b359ff))
* Check for client authority in NetworkAnimator Cmd's ([#1501](https://github.com/MirrorNG/MirrorNG/issues/1501)) ([ecc0659](ecc0659))
* Cosmetic Enhancement of Network Manager ([#1512](https://github.com/MirrorNG/MirrorNG/issues/1512)) ([f53b12b](f53b12b))
* NetworkSceneChecker use Scene instead of string name ([#1496](https://github.com/MirrorNG/MirrorNG/issues/1496)) ([7bb80e3](7bb80e3))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants