-
-
Notifications
You must be signed in to change notification settings - Fork 787
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: #3447 make cached SyncVar fallback to original field value when …
…there is no network context (#3449) * Add Tests * Fix tests relying on undefined behaviors - GetSyncVarGameObjectOnClient() The test relies on the behavior that GameObject SyncVar lookup will behave as client if both isServer and isClient is false. The test is modified in a way that removes unnecessary object creation and uses a single object that is made sure it's context is client-side. - TestSyncingAbstractNetworkBehaviour() This test has been comparing null against null. The test is modified so it simulates each context better. * Make cached SyncVar getters fallback on no network context * Remove unnecessary assertions Gone under my radar doing mindless copy & pasting * Update Assets/Mirror/Core/NetworkBehaviour.cs * Update Assets/Mirror/Core/NetworkBehaviour.cs * Update Assets/Mirror/Core/NetworkBehaviour.cs --------- Co-authored-by: mischa <[email protected]>
- Loading branch information
Showing
3 changed files
with
64 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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 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 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