Skip to content

Commit 191251d

Browse files
docs: fixes of PVP-150-1 [2.X] (#3223)
* Fixes of PVP-150-1 * Remaining fixes * update Updating some of the missing XML API documentation. * Deleted fixed pvp 150-1 exceptions * Corrected PVP exceptions detection * Corrected results from pvp checks location * Added new 150-1 exceptions to verify pvp checks * Removed one pvp error for checks * Moved pvpException file and updated package test job * corrected path * removed pvp check from package-pack * Corrected package-pack * Modified win command * Added missing artifact * Corrected utr command * Removed unnecessary extension of pvpProfiles * Added new 151-1 exceptions * Corrected last 150-1 exceptions * Added last 151-1 exceptions * Corrected error formatting --------- Co-authored-by: NoelStephensUnity <[email protected]>
1 parent 91ebe96 commit 191251d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+673
-845
lines changed

.yamato/package-pack.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ package_pack_-_ngo_{{ platform.name }}:
1212
image: {{ platform.image }}
1313
flavor: {{ platform.flavor }}
1414
timeout: 0.25
15+
variables:
16+
XRAY_PROFILE: "supported ./pvpExceptions.json"
1517
commands:
16-
- npm install -g upm-ci-utils@stable --registry https://artifactory.prd.it.unity3d.com/artifactory/api/npm/upm-npm
17-
- upm-ci package pack --package-path com.unity.netcode.gameobjects
18-
- upm-pvp xray --packages "upm-ci~/packages/*.tgz" --results upm-ci~/xray
19-
- upm-pvp require "supported rme com.unity.netcode.gameobjects/pvpExceptions.json" --allow-missing --results upm-ci~/xray --exemptions upm-ci~/xray/new-exemptions.json
18+
- upm-pvp pack "com.unity.netcode.gameobjects" --output upm-ci~/packages
19+
- upm-pvp xray --packages "upm-ci~/packages/com.unity.netcode.gameobjects*.tgz" --results pvp-results
20+
- upm-pvp require {% if platform.name == "win" %}"%XRAY_PROFILE%"{% else %}"$XRAY_PROFILE"{% endif %} --results pvp-results --allow-missing
2021
artifacts:
22+
logs:
23+
paths:
24+
- "pvp-results/*"
2125
packages:
2226
paths:
2327
- "upm-ci~/**"

.yamato/package-tests.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,30 @@ package_test_-_ngo_{{ editor }}_{{ platform.name }}:
1212
type: {{ platform.type }}
1313
image: {{ platform.image }}
1414
flavor: {{ platform.flavor }}
15+
variables:
16+
XRAY_PROFILE: "supported ./pvpExceptions.json"
17+
UNITY_EXT_LOGGING: 1
1518
commands:
16-
- npm install -g upm-ci-utils@stable --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
1719
- unity-downloader-cli -u {{ editor }} -c Editor --fast --wait
18-
- {% if platform.name == "ubuntu" %}DISPLAY=:0 {% endif %}upm-ci package test -u {{ editor }} --package-path com.unity.netcode.gameobjects --type package-tests --extra-utr-arg="--extra-editor-arg=-testCategory --extra-editor-arg=!Performance --reruncount=1 --clean-library-on-rerun"
20+
# Platform specific UTR setup
21+
- |
22+
{% if platform.name == "win" %}
23+
curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat
24+
{% else %}
25+
curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr && chmod +x utr
26+
{% endif %}
27+
28+
# Validate packages.
29+
- upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --filter "com.unity.netcode.gameobjects" --results pvp-results
30+
- upm-pvp require {% if platform.name == "win" %}"%XRAY_PROFILE%"{% else %}"$XRAY_PROFILE"{% endif %} --results pvp-results
31+
# Run UTR to test packages.
32+
- upm-pvp create-test-project test-project --packages "upm-ci~/packages/*.tgz" --filter "com.unity.netcode.gameobjects" --unity .Editor
33+
- {% if platform.name == "ubuntu" %}DISPLAY=:0 {% endif %} {% if platform.name == "win" %} utr.bat {% else %} ./utr {% endif %} --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --artifacts-path=test-results "--ff={ops.upmpvpevidence.enable=true}" --extra-editor-arg=-testCategory --extra-editor-arg=!Performance --reruncount=1 --clean-library-on-rerun
1934
artifacts:
2035
logs:
2136
paths:
2237
- "upm-ci~/test-results/**/*"
38+
- "pvp-results/*"
2339
dependencies:
2440
- .yamato/package-pack.yml#package_pack_-_ngo_{{ platform.name }}
2541
{% endfor -%}

com.unity.netcode.gameobjects/Editor/NetcodeEditorBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace Unity.Netcode.Editor
1111
[CanEditMultipleObjects]
1212
public partial class NetcodeEditorBase<TT> : UnityEditor.Editor where TT : MonoBehaviour
1313
{
14-
/// <inheritdoc/>
14+
/// <inheritdoc cref="UnityEditor.Editor.OnEnable"/>
1515
public virtual void OnEnable()
1616
{
1717
}

com.unity.netcode.gameobjects/Runtime/Components/AnticipatedNetworkTransform.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,24 @@ namespace Unity.Netcode.Components
1313
///
1414
/// <list type="bullet">
1515
///
16-
/// <item><b>Snap:</b> In this mode (with <see cref="StaleDataHandling"/> set to
16+
/// <item><description><b>Snap:</b> In this mode (with <see cref="StaleDataHandling"/> set to
1717
/// <see cref="StaleDataHandling.Ignore"/> and no <see cref="NetworkBehaviour.OnReanticipate"/> callback),
1818
/// the moment a more up-to-date value is received from the authority, it will simply replace the anticipated value,
19-
/// resulting in a "snap" to the new value if it is different from the anticipated value.</item>
19+
/// resulting in a "snap" to the new value if it is different from the anticipated value.</description></item>
2020
///
21-
/// <item><b>Smooth:</b> In this mode (with <see cref="StaleDataHandling"/> set to
21+
/// <item><description><b>Smooth:</b> In this mode (with <see cref="StaleDataHandling"/> set to
2222
/// <see cref="Netcode.StaleDataHandling.Ignore"/> and an <see cref="NetworkBehaviour.OnReanticipate"/> callback that calls
2323
/// <see cref="Smooth"/> from the anticipated value to the authority value with an appropriate
2424
/// <see cref="Mathf.Lerp"/>-style smooth function), when a more up-to-date value is received from the authority,
25-
/// it will interpolate over time from an incorrect anticipated value to the correct authoritative value.</item>
25+
/// it will interpolate over time from an incorrect anticipated value to the correct authoritative value.</description></item>
2626
///
27-
/// <item><b>Constant Reanticipation:</b> In this mode (with <see cref="StaleDataHandling"/> set to
27+
/// <item><description><b>Constant Reanticipation:</b> In this mode (with <see cref="StaleDataHandling"/> set to
2828
/// <see cref="Netcode.StaleDataHandling.Reanticipate"/> and an <see cref="NetworkBehaviour.OnReanticipate"/> that calculates a
2929
/// new anticipated value based on the current authoritative value), when a more up-to-date value is received from
3030
/// the authority, user code calculates a new anticipated value, possibly calling <see cref="Smooth"/> to interpolate
3131
/// between the previous anticipation and the new anticipation. This is useful for values that change frequently and
3232
/// need to constantly be re-evaluated, as opposed to values that change only in response to user action and simply
33-
/// need a one-time anticipation when the user performs that action.</item>
33+
/// need a one-time anticipation when the user performs that action.</description></item>
3434
///
3535
/// </list>
3636
///
@@ -138,7 +138,7 @@ public bool ShouldReanticipate
138138
/// Anticipate that, at the end of one round trip to the server, this transform will be in the given
139139
/// <see cref="newPosition"/>
140140
/// </summary>
141-
/// <param name="newPosition"></param>
141+
/// <param name="newPosition">The anticipated position</param>
142142
public void AnticipateMove(Vector3 newPosition)
143143
{
144144
if (NetworkManager.ShutdownInProgress || !NetworkManager.IsListening)
@@ -164,7 +164,7 @@ public void AnticipateMove(Vector3 newPosition)
164164
/// Anticipate that, at the end of one round trip to the server, this transform will have the given
165165
/// <see cref="newRotation"/>
166166
/// </summary>
167-
/// <param name="newRotation"></param>
167+
/// <param name="newRotation">The anticipated rotation</param>
168168
public void AnticipateRotate(Quaternion newRotation)
169169
{
170170
if (NetworkManager.ShutdownInProgress || !NetworkManager.IsListening)
@@ -190,7 +190,7 @@ public void AnticipateRotate(Quaternion newRotation)
190190
/// Anticipate that, at the end of one round trip to the server, this transform will have the given
191191
/// <see cref="newScale"/>
192192
/// </summary>
193-
/// <param name="newScale"></param>
193+
/// <param name="newScale">The anticipated scale</param>
194194
public void AnticipateScale(Vector3 newScale)
195195
{
196196
if (NetworkManager.ShutdownInProgress || !NetworkManager.IsListening)
@@ -216,7 +216,7 @@ public void AnticipateScale(Vector3 newScale)
216216
/// Anticipate that, at the end of one round trip to the server, the transform will have the given
217217
/// <see cref="newState"/>
218218
/// </summary>
219-
/// <param name="newState"></param>
219+
/// <param name="newState">The anticipated transform state</param>
220220
public void AnticipateState(TransformState newState)
221221
{
222222
if (NetworkManager.ShutdownInProgress || !NetworkManager.IsListening)
@@ -463,9 +463,9 @@ public override void OnDestroy()
463463
/// <see cref="to"/> over <see cref="durationSeconds"/> of real time. The duration uses
464464
/// <see cref="Time.deltaTime"/>, so it is affected by <see cref="Time.timeScale"/>.
465465
/// </summary>
466-
/// <param name="from"></param>
467-
/// <param name="to"></param>
468-
/// <param name="durationSeconds"></param>
466+
/// <param name="from">Starting transform state</param>
467+
/// <param name="to">Target transform state</param>
468+
/// <param name="durationSeconds">Interpolation time in seconds</param>
469469
public void Smooth(TransformState from, TransformState to, float durationSeconds)
470470
{
471471
var transform_ = transform;

com.unity.netcode.gameobjects/Runtime/Components/HalfVector3.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public void UpdateFrom(ref Vector3 vector3)
129129
/// Constructor
130130
/// </summary>
131131
/// <param name="vector3">The initial axial values (converted to half floats) when instantiated.</param>
132-
/// <param name="vector3AxisToSynchronize">The axis to synchronize.</param>
132+
/// <param name="axisToSynchronize">The axis to synchronize.</param>
133133
public HalfVector3(Vector3 vector3, bool3 axisToSynchronize)
134134
{
135135
Axis = half3.zero;

com.unity.netcode.gameobjects/Runtime/Components/Interpolator/BufferedLinearInterpolator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ protected internal override void OnConvertTransformSpace(Transform transform, bo
400400
}
401401

402402
/// <summary>
403-
/// A <see cref="BufferedLinearInterpolator<T>"/> <see cref="Vector3"/> implementation.
403+
/// A <see cref="BufferedLinearInterpolator{T}"/> <see cref="Vector3"/> implementation.
404404
/// </summary>
405405
public class BufferedLinearInterpolatorVector3 : BufferedLinearInterpolator<Vector3>
406406
{

com.unity.netcode.gameobjects/Runtime/Components/NetworkTransform.cs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,9 +1482,8 @@ private bool ShouldSynchronizeHalfFloat(ulong targetClientId)
14821482
/// <remarks>
14831483
/// If a derived class overrides this, then make sure to invoke this base method!
14841484
/// </remarks>
1485-
/// <typeparam name="T"></typeparam>
1486-
/// <param name="serializer"></param>
1487-
/// <param name="targetClientId">the clientId being synchronized (both reading and writing)</param>
1485+
/// <typeparam name="T">The serializer type for buffer operations</typeparam>
1486+
/// <param name="serializer">The buffer serializer used for network state synchronization</param>
14881487
protected override void OnSynchronize<T>(ref BufferSerializer<T> serializer)
14891488
{
14901489
var targetClientId = m_TargetIdBeingSynchronized;
@@ -3200,7 +3199,7 @@ protected virtual void OnInitialize(ref NetworkTransformState replicatedState)
32003199
/// This method is only invoked by the owner
32013200
/// Use: OnInitialize(ref NetworkTransformState replicatedState) to be notified on all instances
32023201
/// </summary>
3203-
/// <param name="replicatedState"></param>
3202+
/// <param name="replicatedState">The NetworkVariable containing the <see cref="NetworkTransformState"/></param>
32043203
protected virtual void OnInitialize(ref NetworkVariable<NetworkTransformState> replicatedState)
32053204
{
32063205

@@ -3527,11 +3526,11 @@ internal override void InternalOnNetworkObjectParentChanged(NetworkObject parent
35273526
/// The parameters are broken up into pos / rot / scale on purpose so that the caller can perturb
35283527
/// just the desired one(s)
35293528
/// </summary>
3530-
/// <param name="posIn"></param> new position to move to. Can be null
3531-
/// <param name="rotIn"></param> new rotation to rotate to. Can be null
3529+
/// <param name="posIn">new position to move to. Can be null</param>
3530+
/// <param name="rotIn">new rotation to rotate to. Can be null</param>
35323531
/// <param name="scaleIn">new scale to scale to. Can be null</param>
35333532
/// <param name="teleportDisabled">When true (the default) the <see cref="NetworkObject"/> will not be teleported and, if enabled, will interpolate. When false the <see cref="NetworkObject"/> will teleport/apply the parameters provided immediately.</param>
3534-
/// <exception cref="Exception"></exception>
3533+
/// <exception cref="Exception">Thrown when the function is called on non-spawned object or, when it's called without proper authority</exception>
35353534
public void SetState(Vector3? posIn = null, Quaternion? rotIn = null, Vector3? scaleIn = null, bool teleportDisabled = true)
35363535
{
35373536
if (!IsSpawned)
@@ -3667,10 +3666,10 @@ private void SetStateServerRpc(Vector3 pos, Quaternion rot, Vector3 scale, bool
36673666
/// This is intended to be used on already spawned objects, for setting the position of a dynamically spawned object just apply the transform values prior to spawning. <br />
36683667
/// With player objects, override the <see cref="OnNetworkSpawn"/> method and have the authority make adjustments to the transform prior to invoking base.OnNetworkSpawn.
36693668
/// </remarks>
3670-
/// <param name="newPosition"></param> new position to move to.
3671-
/// <param name="newRotation"></param> new rotation to rotate to.
3669+
/// <param name="newPosition">new position to move to.</param>
3670+
/// <param name="newRotation">new rotation to rotate to.</param>
36723671
/// <param name="newScale">new scale to scale to.</param>
3673-
/// <exception cref="Exception"></exception>
3672+
/// <exception cref="Exception">Thrown when called from a non-authoritative context (client without ownership)</exception>
36743673
public void Teleport(Vector3 newPosition, Quaternion newRotation, Vector3 newScale)
36753674
{
36763675
if (!CanCommitToTransform)
@@ -3732,7 +3731,7 @@ private void UpdateInterpolation()
37323731
}
37333732
}
37343733

3735-
/// <inheritdoc/>
3734+
/// <inheritdoc cref="INetworkUpdateSystem.OnUpdate"/>
37363735
/// <remarks>
37373736
/// If you override this method, be sure that:
37383737
/// - Non-authority always invokes this base class method.

com.unity.netcode.gameobjects/Runtime/Configuration/NetworkConfig.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ internal void OnValidate()
204204
/// <summary>
205205
/// Returns a base64 encoded version of the configuration
206206
/// </summary>
207-
/// <returns></returns>
207+
/// <returns>base64 encoded string containing the serialized network configuration</returns>
208208
public string ToBase64()
209209
{
210210
NetworkConfig config = this;
@@ -271,8 +271,8 @@ internal void ClearConfigHash()
271271
/// <summary>
272272
/// Gets a SHA256 hash of parts of the NetworkConfig instance
273273
/// </summary>
274-
/// <param name="cache"></param>
275-
/// <returns></returns>
274+
/// <param name="cache">When true, caches the computed hash value for future retrievals, when false, always recomputes the hash</param>
275+
/// <returns>A 64-bit hash value representing the configuration state</returns>
276276
public ulong GetConfig(bool cache = true)
277277
{
278278
if (m_ConfigHash != null && cache)
@@ -316,8 +316,11 @@ public ulong GetConfig(bool cache = true)
316316
/// <summary>
317317
/// Compares a SHA256 hash with the current NetworkConfig instances hash
318318
/// </summary>
319-
/// <param name="hash"></param>
320-
/// <returns></returns>
319+
/// <param name="hash">The 64-bit hash value to compare against this configuration's hash</param>
320+
/// <returns>
321+
/// True if the hashes match, indicating compatible configurations.
322+
/// False if the hashes differ, indicating potentially incompatible configurations.
323+
/// </returns>
321324
public bool CompareConfig(ulong hash)
322325
{
323326
return hash == GetConfig();

com.unity.netcode.gameobjects/Runtime/Configuration/NetworkPrefabsList.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class NetworkPrefabsList : ScriptableObject
3838
/// Adds a prefab to the prefab list. Performing this here will apply the operation to all
3939
/// <see cref="NetworkManager"/>s that reference this list.
4040
/// </summary>
41-
/// <param name="prefab"></param>
41+
/// <param name="prefab">The NetworkPrefab to add to the shared list</param>
4242
public void Add(NetworkPrefab prefab)
4343
{
4444
List.Add(prefab);
@@ -49,7 +49,7 @@ public void Add(NetworkPrefab prefab)
4949
/// Removes a prefab from the prefab list. Performing this here will apply the operation to all
5050
/// <see cref="NetworkManager"/>s that reference this list.
5151
/// </summary>
52-
/// <param name="prefab"></param>
52+
/// <param name="prefab">The NetworkPrefab to remove from the shared list</param>
5353
public void Remove(NetworkPrefab prefab)
5454
{
5555
List.Remove(prefab);

0 commit comments

Comments
 (0)