-
Notifications
You must be signed in to change notification settings - Fork 450
fix: In-scene NetworkObjects disabled but never re-enabled after scene transition #1354
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
Merged
andrews-unity
merged 25 commits into
develop
from
fix/InScene-NetworkObjects-DDOL-Disabled-MTT-1479
Nov 10, 2021
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
e1b9a02
fix
NoelStephensUnity 34f44ff
Merge branch 'develop' into fix/InScene-NetworkObjects-DDOL-Disabled-…
NoelStephensUnity 4081559
test
NoelStephensUnity bef8dbc
Merge branch 'develop' into fix/InScene-NetworkObjects-DDOL-Disabled-…
NoelStephensUnity 7240475
style
NoelStephensUnity b7f94e4
style
NoelStephensUnity 45716b6
style
NoelStephensUnity 02f30b5
Merge branch 'develop' into fix/InScene-NetworkObjects-DDOL-Disabled-…
NoelStephensUnity 1783927
style
NoelStephensUnity adc0377
Merge branch 'develop' into fix/InScene-NetworkObjects-DDOL-Disabled-…
andrews-unity 5012691
Merge branch 'develop' into fix/InScene-NetworkObjects-DDOL-Disabled-…
NoelStephensUnity 87a948b
fix and test
NoelStephensUnity ec589f4
test update
NoelStephensUnity 1100c12
style
NoelStephensUnity 1115632
updated changelog
NoelStephensUnity 5d6e7da
Merge branch 'develop' into fix/InScene-NetworkObjects-DDOL-Disabled-…
NoelStephensUnity 9039933
Merge branch 'develop' into fix/InScene-NetworkObjects-DDOL-Disabled-…
NoelStephensUnity be5884c
refactor
NoelStephensUnity 4869760
updated changelog
NoelStephensUnity def0ad0
Merge branch 'develop' into fix/InScene-NetworkObjects-DDOL-Disabled-…
NoelStephensUnity d59f3da
Merge branch 'develop' into fix/InScene-NetworkObjects-DDOL-Disabled-…
NoelStephensUnity c55dc8f
Merge branch 'develop' into fix/InScene-NetworkObjects-DDOL-Disabled-…
NoelStephensUnity 8a60e2e
Merge branch 'develop' into fix/InScene-NetworkObjects-DDOL-Disabled-…
NoelStephensUnity 1e126b6
Merge develop into fix/InScene-NetworkObjects-DDOL-Disabled-MTT-1479
github-actions[bot] 448358f
Merge branch 'develop' into fix/InScene-NetworkObjects-DDOL-Disabled-…
andrews-unity File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears that these are being made internal so that you can test them directly? This is a testing anti-pattern. To paraphrase a great number of testing authorities: "How do you test internals? Through the public API."
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah... the test to validate this fix was a little tricky.
The only place the two methods pertaining to this bug and fix (MoveObjectsToDontDestroyOnLoad and MoveObjectsFromDontDestroyOnLoadToScene ) are called is when there is a full scene transition taking place. Since we cannot do a full scene transition (i.e. it would unload the Test Runner's temporary scene and would break the rest of the tests) in a unit and/or integration test, the only way to write a test (currently) to verify the fix in this PR was to create the same circumstances and call the same methods...which required them to be accessible.
If you want, I could reduce the anti-pattern footprint by just testing the MoveObjectsFromDontDestroyOnLoadToScene method and not including the MoveObjectsToDontDestroyOnLoad in that process (i.e. just disable it in the unit test itself).