diff --git a/.yamato/wrench/validation-jobs.yml b/.yamato/wrench/validation-jobs.yml index 88d9effe4e..f268a8523d 100644 --- a/.yamato/wrench/validation-jobs.yml +++ b/.yamato/wrench/validation-jobs.yml @@ -21,7 +21,7 @@ validate_-_netcode_gameobjects_-_2021_3_-_macos: retries: 1 - command: echo No internal packages to add. - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp - timeout: 40 + timeout: 180 retries: 0 - command: upm-pvp require "pkgprom-promote -PVP-29-2 rme" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json timeout: 5 @@ -30,7 +30,7 @@ validate_-_netcode_gameobjects_-_2021_3_-_macos: timeout: 10 retries: 0 - command: UnifiedTestRunner --testproject=test-netcode.gameobjects --editor-location=.Editor --clean-library --reruncount=1 --clean-library-on-rerun --artifacts-path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}" - timeout: 40 + timeout: 180 retries: 1 after: - command: bash .yamato/generated-scripts/infrastructure-instability-detection-mac.sh @@ -87,7 +87,7 @@ validate_-_netcode_gameobjects_-_2021_3_-_ubuntu: retries: 1 - command: echo No internal packages to add. - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp - timeout: 40 + timeout: 180 retries: 0 - command: upm-pvp require "pkgprom-promote -PVP-29-2 rme" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json timeout: 5 @@ -96,7 +96,7 @@ validate_-_netcode_gameobjects_-_2021_3_-_ubuntu: timeout: 10 retries: 0 - command: UnifiedTestRunner --testproject=test-netcode.gameobjects --editor-location=.Editor --clean-library --reruncount=1 --clean-library-on-rerun --artifacts-path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}" - timeout: 40 + timeout: 180 retries: 1 after: - command: bash .yamato/generated-scripts/infrastructure-instability-detection-linux.sh @@ -153,7 +153,7 @@ validate_-_netcode_gameobjects_-_2021_3_-_windows: retries: 1 - command: echo No internal packages to add. - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp - timeout: 40 + timeout: 180 retries: 0 - command: upm-pvp require "pkgprom-promote -PVP-29-2 rme" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json timeout: 5 @@ -162,7 +162,7 @@ validate_-_netcode_gameobjects_-_2021_3_-_windows: timeout: 10 retries: 0 - command: UnifiedTestRunner.exe --testproject=test-netcode.gameobjects --editor-location=.Editor --clean-library --reruncount=1 --clean-library-on-rerun --artifacts-path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}" - timeout: 40 + timeout: 180 retries: 1 after: - command: .yamato\generated-scripts\infrastructure-instability-detection-win.cmd @@ -219,7 +219,7 @@ validate_-_netcode_gameobjects_-_2022_3_-_macos: retries: 1 - command: echo No internal packages to add. - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp - timeout: 40 + timeout: 180 retries: 0 - command: upm-pvp require "pkgprom-promote -PVP-29-2 rme" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json timeout: 5 @@ -228,7 +228,7 @@ validate_-_netcode_gameobjects_-_2022_3_-_macos: timeout: 10 retries: 0 - command: UnifiedTestRunner --testproject=test-netcode.gameobjects --editor-location=.Editor --clean-library --reruncount=1 --clean-library-on-rerun --artifacts-path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}" - timeout: 40 + timeout: 180 retries: 1 after: - command: bash .yamato/generated-scripts/infrastructure-instability-detection-mac.sh @@ -285,7 +285,7 @@ validate_-_netcode_gameobjects_-_2022_3_-_ubuntu: retries: 1 - command: echo No internal packages to add. - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp - timeout: 40 + timeout: 180 retries: 0 - command: upm-pvp require "pkgprom-promote -PVP-29-2 rme" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json timeout: 5 @@ -294,7 +294,7 @@ validate_-_netcode_gameobjects_-_2022_3_-_ubuntu: timeout: 10 retries: 0 - command: UnifiedTestRunner --testproject=test-netcode.gameobjects --editor-location=.Editor --clean-library --reruncount=1 --clean-library-on-rerun --artifacts-path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}" - timeout: 40 + timeout: 180 retries: 1 after: - command: bash .yamato/generated-scripts/infrastructure-instability-detection-linux.sh @@ -351,7 +351,7 @@ validate_-_netcode_gameobjects_-_2022_3_-_windows: retries: 1 - command: echo No internal packages to add. - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp - timeout: 40 + timeout: 180 retries: 0 - command: upm-pvp require "pkgprom-promote -PVP-29-2 rme" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json timeout: 5 @@ -360,7 +360,7 @@ validate_-_netcode_gameobjects_-_2022_3_-_windows: timeout: 10 retries: 0 - command: UnifiedTestRunner.exe --testproject=test-netcode.gameobjects --editor-location=.Editor --clean-library --reruncount=1 --clean-library-on-rerun --artifacts-path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}" - timeout: 40 + timeout: 180 retries: 1 after: - command: .yamato\generated-scripts\infrastructure-instability-detection-win.cmd @@ -417,7 +417,7 @@ validate_-_netcode_gameobjects_-_6000_0_-_macos: retries: 1 - command: echo No internal packages to add. - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp - timeout: 40 + timeout: 180 retries: 0 - command: upm-pvp require "pkgprom-promote -PVP-29-2 rme" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json timeout: 5 @@ -426,7 +426,7 @@ validate_-_netcode_gameobjects_-_6000_0_-_macos: timeout: 10 retries: 0 - command: UnifiedTestRunner --testproject=test-netcode.gameobjects --editor-location=.Editor --clean-library --reruncount=1 --clean-library-on-rerun --artifacts-path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}" - timeout: 40 + timeout: 180 retries: 1 after: - command: bash .yamato/generated-scripts/infrastructure-instability-detection-mac.sh @@ -483,7 +483,7 @@ validate_-_netcode_gameobjects_-_6000_0_-_ubuntu: retries: 1 - command: echo No internal packages to add. - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp - timeout: 40 + timeout: 180 retries: 0 - command: upm-pvp require "pkgprom-promote -PVP-29-2 rme" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json timeout: 5 @@ -492,7 +492,7 @@ validate_-_netcode_gameobjects_-_6000_0_-_ubuntu: timeout: 10 retries: 0 - command: UnifiedTestRunner --testproject=test-netcode.gameobjects --editor-location=.Editor --clean-library --reruncount=1 --clean-library-on-rerun --artifacts-path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}" - timeout: 40 + timeout: 180 retries: 1 after: - command: bash .yamato/generated-scripts/infrastructure-instability-detection-linux.sh @@ -549,7 +549,7 @@ validate_-_netcode_gameobjects_-_6000_0_-_windows: retries: 1 - command: echo No internal packages to add. - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp - timeout: 40 + timeout: 180 retries: 0 - command: upm-pvp require "pkgprom-promote -PVP-29-2 rme" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json timeout: 5 @@ -558,7 +558,7 @@ validate_-_netcode_gameobjects_-_6000_0_-_windows: timeout: 10 retries: 0 - command: UnifiedTestRunner.exe --testproject=test-netcode.gameobjects --editor-location=.Editor --clean-library --reruncount=1 --clean-library-on-rerun --artifacts-path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}" - timeout: 40 + timeout: 180 retries: 1 after: - command: .yamato\generated-scripts\infrastructure-instability-detection-win.cmd @@ -615,7 +615,7 @@ validate_-_netcode_gameobjects_-_6000_1_-_macos: retries: 1 - command: echo No internal packages to add. - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp - timeout: 40 + timeout: 180 retries: 0 - command: upm-pvp require "pkgprom-promote -PVP-29-2 rme" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json timeout: 5 @@ -624,7 +624,7 @@ validate_-_netcode_gameobjects_-_6000_1_-_macos: timeout: 10 retries: 0 - command: UnifiedTestRunner --testproject=test-netcode.gameobjects --editor-location=.Editor --clean-library --reruncount=1 --clean-library-on-rerun --artifacts-path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}" - timeout: 40 + timeout: 180 retries: 1 after: - command: bash .yamato/generated-scripts/infrastructure-instability-detection-mac.sh @@ -681,7 +681,7 @@ validate_-_netcode_gameobjects_-_6000_1_-_ubuntu: retries: 1 - command: echo No internal packages to add. - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp - timeout: 40 + timeout: 180 retries: 0 - command: upm-pvp require "pkgprom-promote -PVP-29-2 rme" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json timeout: 5 @@ -690,7 +690,7 @@ validate_-_netcode_gameobjects_-_6000_1_-_ubuntu: timeout: 10 retries: 0 - command: UnifiedTestRunner --testproject=test-netcode.gameobjects --editor-location=.Editor --clean-library --reruncount=1 --clean-library-on-rerun --artifacts-path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}" - timeout: 40 + timeout: 180 retries: 1 after: - command: bash .yamato/generated-scripts/infrastructure-instability-detection-linux.sh @@ -747,7 +747,7 @@ validate_-_netcode_gameobjects_-_6000_1_-_windows: retries: 1 - command: echo No internal packages to add. - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp - timeout: 40 + timeout: 180 retries: 0 - command: upm-pvp require "pkgprom-promote -PVP-29-2 rme" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json timeout: 5 @@ -756,7 +756,7 @@ validate_-_netcode_gameobjects_-_6000_1_-_windows: timeout: 10 retries: 0 - command: UnifiedTestRunner.exe --testproject=test-netcode.gameobjects --editor-location=.Editor --clean-library --reruncount=1 --clean-library-on-rerun --artifacts-path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}" - timeout: 40 + timeout: 180 retries: 1 after: - command: .yamato\generated-scripts\infrastructure-instability-detection-win.cmd @@ -813,7 +813,7 @@ validate_-_netcode_gameobjects_-_6000_2_-_macos: retries: 1 - command: echo No internal packages to add. - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp - timeout: 40 + timeout: 180 retries: 0 - command: upm-pvp require "pkgprom-promote -PVP-29-2 rme" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json timeout: 5 @@ -822,7 +822,7 @@ validate_-_netcode_gameobjects_-_6000_2_-_macos: timeout: 10 retries: 0 - command: UnifiedTestRunner --testproject=test-netcode.gameobjects --editor-location=.Editor --clean-library --reruncount=1 --clean-library-on-rerun --artifacts-path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}" - timeout: 40 + timeout: 180 retries: 1 after: - command: bash .yamato/generated-scripts/infrastructure-instability-detection-mac.sh @@ -879,7 +879,7 @@ validate_-_netcode_gameobjects_-_6000_2_-_ubuntu: retries: 1 - command: echo No internal packages to add. - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp - timeout: 40 + timeout: 180 retries: 0 - command: upm-pvp require "pkgprom-promote -PVP-29-2 rme" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json timeout: 5 @@ -888,7 +888,7 @@ validate_-_netcode_gameobjects_-_6000_2_-_ubuntu: timeout: 10 retries: 0 - command: UnifiedTestRunner --testproject=test-netcode.gameobjects --editor-location=.Editor --clean-library --reruncount=1 --clean-library-on-rerun --artifacts-path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}" - timeout: 40 + timeout: 180 retries: 1 after: - command: bash .yamato/generated-scripts/infrastructure-instability-detection-linux.sh @@ -945,7 +945,7 @@ validate_-_netcode_gameobjects_-_6000_2_-_windows: retries: 1 - command: echo No internal packages to add. - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp - timeout: 40 + timeout: 180 retries: 0 - command: upm-pvp require "pkgprom-promote -PVP-29-2 rme" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json timeout: 5 @@ -954,7 +954,7 @@ validate_-_netcode_gameobjects_-_6000_2_-_windows: timeout: 10 retries: 0 - command: UnifiedTestRunner.exe --testproject=test-netcode.gameobjects --editor-location=.Editor --clean-library --reruncount=1 --clean-library-on-rerun --artifacts-path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}" - timeout: 40 + timeout: 180 retries: 1 after: - command: .yamato\generated-scripts\infrastructure-instability-detection-win.cmd diff --git a/com.unity.netcode.gameobjects/CHANGELOG.md b/com.unity.netcode.gameobjects/CHANGELOG.md index b27429bf0a..166b9b3710 100644 --- a/com.unity.netcode.gameobjects/CHANGELOG.md +++ b/com.unity.netcode.gameobjects/CHANGELOG.md @@ -10,6 +10,14 @@ Additional documentation and release notes are available at [Multiplayer Documen ### Added +### Fixed + +### Changed + +## [1.13.0] - 2025-04-29 + +### Added + - Added `NetworkManager.OnPreShutdown` which is called before the NetworkManager cleans up and shuts down. (#3358) - Added `FastBufferReader(ArraySegment buffer, Allocator copyAllocator)` constructor that uses the `ArraySegment.Offset` as the `FastBufferReader` offset and the `ArraySegment.Count` as the `FastBufferReader` length. (#3320) - Added `FastBufferReader(ArraySegment buffer, Allocator copyAllocator, int length = -1)` constructor that uses the `ArraySegment.Offset` as the `FastBufferReader` offset. (#3320) diff --git a/com.unity.netcode.gameobjects/Runtime/Timing/NetworkTime.cs b/com.unity.netcode.gameobjects/Runtime/Timing/NetworkTime.cs index b66ad3ef21..684fa80759 100644 --- a/com.unity.netcode.gameobjects/Runtime/Timing/NetworkTime.cs +++ b/com.unity.netcode.gameobjects/Runtime/Timing/NetworkTime.cs @@ -118,6 +118,16 @@ public NetworkTime ToFixedTime() return new NetworkTime(m_TickRate, m_CachedTick); } + /// + /// Calculates a NetworkTime value representing a point in the past relative to the current time (few ticks in the past). + /// + /// The number of ticks ago we're querying the time. + /// A NetworkTime value representing the calculated past time point + public NetworkTime TimeTicksAgo(int ticks) + { + return TimeTicksAgo(ticks, 0.0f); + } + /// /// Calculates a NetworkTime value representing a point in the past relative to the current time (few ticks in the past) /// diff --git a/com.unity.netcode.gameobjects/package.json b/com.unity.netcode.gameobjects/package.json index b69c98f2c8..4335e07b0f 100644 --- a/com.unity.netcode.gameobjects/package.json +++ b/com.unity.netcode.gameobjects/package.json @@ -2,7 +2,7 @@ "name": "com.unity.netcode.gameobjects", "displayName": "Netcode for GameObjects", "description": "Netcode for GameObjects is a high-level netcode SDK that provides networking capabilities to GameObject/MonoBehaviour workflows within Unity and sits on top of underlying transport layer.", - "version": "1.12.2", + "version": "1.13.0", "unity": "2021.3", "dependencies": { "com.unity.nuget.mono-cecil": "1.10.1",