-
Notifications
You must be signed in to change notification settings - Fork 463
chore: runtime/timing classes moved to unity.netcode.gameobjects.timing namespace #4150
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
Open
NoelStephensUnity
wants to merge
11
commits into
develop-3.x.x
Choose a base branch
from
chore/timing-namespace-to-gameobjects
base: develop-3.x.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
58dc11e
test: cover the timing namespace relocation in the API updater project
NoelStephensUnity a7c8e62
chore: move the timing types to Unity.Netcode.GameObjects.Timing
NoelStephensUnity 101de99
docs: repoint the NetworkTimeSystem API cross-reference at the new na…
NoelStephensUnity b446914
ci: run the API updater test in both modes
NoelStephensUnity 6013f45
fix: reach the moved NetworkTimeSystem through an alias
NoelStephensUnity 4f64cd2
style: drop the imports and qualifications the new namespace makes re…
NoelStephensUnity 8ee6b99
docs: describe the collision stub as what N4E actually shipped
NoelStephensUnity ce53a03
Merge branch 'develop-3.x.x' into chore/timing-namespace-to-gameobjects
NoelStephensUnity 59c036a
docs: correct the collision stub docs and qualify the migration claim
NoelStephensUnity 9022abd
test: assert the namespace alias use site was rewritten
NoelStephensUnity 3ded452
fix: reach the moved NetworkTime through an alias as well
NoelStephensUnity 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
14 changes: 14 additions & 0 deletions
14
apiupdaterproject/Assets/CollisionStub~/N4E.CollisionStub.asmdef
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "name": "N4E.CollisionStub", | ||
| "rootNamespace": "Unity.Netcode", | ||
| "references": [], | ||
| "includePlatforms": [], | ||
| "excludePlatforms": [], | ||
| "allowUnsafeCode": false, | ||
| "overrideReferences": false, | ||
| "precompiledReferences": [], | ||
| "autoReferenced": true, | ||
| "defineConstraints": [], | ||
| "versionDefines": [], | ||
| "noEngineReferences": true | ||
| } |
17 changes: 17 additions & 0 deletions
17
apiupdaterproject/Assets/CollisionStub~/N4ECollisionStub.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| // Stands in for a second package occupying Unity.Netcode.NetworkTimeSystem, which is what Netcode | ||
| // for Entities does as of 6.7.0: its casing correction moved 204 files into Unity.Netcode, and it | ||
| // sub-namespaced NetworkTime into Unity.Netcode.NetcodeTime but left NetworkTimeSystem behind. | ||
| // | ||
| // Only that one name collides. NetworkTime and NetworkTickSystem deliberately are not declared here, | ||
| // so a --collision-stub run asserts both halves of the finding in one pass: those two migrate, and | ||
| // the one whose old name still resolves cannot. | ||
| // | ||
| // Inert until run_upgrade_test.py --collision-stub copies this folder into place. Unity does not | ||
| // import a directory whose name ends in '~'. | ||
| namespace Unity.Netcode | ||
| { | ||
| public class NetworkTimeSystem | ||
| { | ||
| public uint EffectiveInputLatencyTicks; | ||
| } | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| // Update only if the relocated runtime timing API changes. Deliberately written against the | ||
| // pre-move namespace: this file is the test's input, not code to clean up. See ../../README.md. | ||
| // | ||
| // Each of the three types is named at least once in fully qualified form, so a --collision-stub run | ||
| // can tell "was not rewritten" apart from "was never referenced". | ||
| #pragma warning disable 169 // Ignore field is never used warnings | ||
|
|
||
| using System; | ||
| using System.Collections.Generic; | ||
| using Unity.Netcode; | ||
| using TimeNs = Unity.Netcode; | ||
| using TimeValue = Unity.Netcode.NetworkTime; | ||
|
|
||
| namespace ApiUpdaterProject | ||
| { | ||
| // Unity.Netcode -> Unity.Netcode.GameObjects.Timing | ||
| internal class DeprecatedTimingUsage | ||
| { | ||
| // using directive plus simple name | ||
| private NetworkTime m_SimpleName; | ||
| private NetworkTimeSystem m_TimeSystem; | ||
| private NetworkTickSystem m_TickSystem; | ||
|
|
||
| // Fully qualified | ||
| private Unity.Netcode.NetworkTime m_TimeFullyQualified; | ||
| private Unity.Netcode.NetworkTimeSystem m_TimeSystemFullyQualified; | ||
| private Unity.Netcode.NetworkTickSystem m_TickSystemFullyQualified; | ||
|
|
||
| // Through a namespace alias, and through a type alias | ||
| private TimeNs.NetworkTickSystem m_ThroughNamespaceAlias; | ||
| private TimeValue m_ThroughTypeAlias; | ||
|
|
||
| // As a generic type argument | ||
| private List<NetworkTime> m_AsGenericArgument; | ||
|
|
||
| // typeof | ||
| private Type TimeSystemType => typeof(NetworkTimeSystem); | ||
|
|
||
| // Constructor call, and as a return type | ||
| private NetworkTime Construct(uint tickRate) => new NetworkTime(tickRate, 0d); | ||
|
|
||
| // As a parameter type | ||
| private static double TickOf(NetworkTime time) => time.TickWithPartial; | ||
| } | ||
| } | ||
11 changes: 11 additions & 0 deletions
11
apiupdaterproject/Assets/Runtime/DeprecatedTimingUsage.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.