Skip to content

Commit c2e8cd8

Browse files
chore(deps): update bokken image package-ci/ubuntu-22.04 to v4.81.0 (develop-2.0.0) (#3839)
* chore(deps): update bokken image package-ci/ubuntu-22.04 to v4.81.0 * fixed standards error * temp fix for standards * Modified standards check to print the diff to ease fixing and corrected files * fix linter * Fixed standard issues * more fixes * exempted file --------- Co-authored-by: unity-renovate[bot] <120015202+unity-renovate[bot]@users.noreply.github.com> Co-authored-by: Michał Chrobot <124174716+michalChrobot@users.noreply.github.com> Co-authored-by: michal-chrobot <michal.chrobot@unity3d.com>
1 parent 6f48d4f commit c2e8cd8

32 files changed

+257
-246
lines changed

.yamato/project-standards.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ standards_{{ platform.name }}_{{ project.name }}_{{ editor }}:
4747

4848
- unity-downloader-cli --fast --wait -u {{ editor }} -c editor {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models. Downloads basic editor
4949
- .Editor/Unity -batchmode -nographics -logFile - -executeMethod Packages.Rider.Editor.RiderScriptEditor.SyncSolution -projectPath {{ project.path }} -quit # This command is used to invoke Unity in a "headless" mode. It's used to sync the project
50-
- dotnet run --project=dotnet-tools/netcode.standards -- --project={{ project.path }} --check # Runs standards check
50+
- dotnet run --project=dotnet-tools/netcode.standards -- --project={{ project.path }} --fix # Auto-fix formatting issues
51+
- git checkout -- {{ project.path }}/Packages/manifest.json {{ project.path }}/Packages/packages-lock.json {{ project.path }}/ProjectSettings/ProjectVersion.txt 2>/dev/null || true # Restore files that Unity may have modified (we only want to check code formatting)
52+
- 'git diff --exit-code || (echo "ERROR: Code formatting issues found. Run dotnet run --project=dotnet-tools/netcode.standards -- --project={{ project.path }} --fix locally and commit the changes." && exit 1)' # Fail if formatter made any changes
5153
{% endfor -%}
5254
{% endfor -%}
5355
{% endfor -%}

.yamato/project.metafile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
small_agent_platform:
2525
- name: ubuntu
2626
type: Unity::VM
27-
image: package-ci/ubuntu-22.04:v4.77.0
27+
image: package-ci/ubuntu-22.04:v4.81.0
2828
flavor: b1.small
2929

3030

@@ -39,13 +39,13 @@ test_platforms:
3939
default:
4040
- name: ubuntu
4141
type: Unity::VM
42-
image: package-ci/ubuntu-22.04:v4.77.0
42+
image: package-ci/ubuntu-22.04:v4.81.0
4343
flavor: b1.large
4444
standalone: StandaloneLinux64
4545
desktop:
4646
- name: ubuntu
4747
type: Unity::VM
48-
image: package-ci/ubuntu-22.04:v4.77.0
48+
image: package-ci/ubuntu-22.04:v4.81.0
4949
flavor: b1.large
5050
smaller_flavor: b1.medium
5151
larger_flavor: b1.xlarge

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ private void DisplayNetworkRigidbodyProperties()
3333
public override void OnInspectorGUI()
3434
{
3535
var networkRigidbodyBase = target as NetworkRigidbodyBase;
36-
void SetExpanded(bool expanded) { networkRigidbodyBase.NetworkRigidbodyBaseExpanded = expanded; };
36+
void SetExpanded(bool expanded)
37+
{
38+
networkRigidbodyBase.NetworkRigidbodyBaseExpanded = expanded;
39+
}
40+
3741
DrawFoldOutGroup<NetworkRigidbodyBase>(networkRigidbodyBase.GetType(), DisplayNetworkRigidbodyProperties, networkRigidbodyBase.NetworkRigidbodyBaseExpanded, SetExpanded);
3842
base.OnInspectorGUI();
3943
}

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,11 @@ private void DrawToggleProperty(Rect rect, string label, SerializedProperty prop
307307
public override void OnInspectorGUI()
308308
{
309309
var networkTransform = target as NetworkTransform;
310-
void SetExpanded(bool expanded) { networkTransform.NetworkTransformExpanded = expanded; };
310+
void SetExpanded(bool expanded)
311+
{
312+
networkTransform.NetworkTransformExpanded = expanded;
313+
}
314+
311315
DrawFoldOutGroup<NetworkTransform>(networkTransform.GetType(), DisplayNetworkTransformProperties, networkTransform.NetworkTransformExpanded, SetExpanded);
312316
base.OnInspectorGUI();
313317
}

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -754,11 +754,8 @@ static AnimationParamEnumWrapper()
754754
/// </summary>
755755
private void SpawnCleanup()
756756
{
757-
if (m_NetworkAnimatorStateChangeHandler != null)
758-
{
759-
m_NetworkAnimatorStateChangeHandler.DeregisterUpdate();
760-
m_NetworkAnimatorStateChangeHandler = null;
761-
}
757+
m_NetworkAnimatorStateChangeHandler?.DeregisterUpdate();
758+
m_NetworkAnimatorStateChangeHandler = null;
762759
}
763760

764761
public override void OnDestroy()

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public interface IContactEventHandler
3838
/// <summary>
3939
/// Should return a <see cref="Rigidbody"/>.
4040
/// </summary>
41-
Rigidbody GetRigidbody();
41+
public Rigidbody GetRigidbody();
4242

4343
/// <summary>
4444
/// Invoked by the <see cref="RigidbodyContactEventManager"/> instance.
@@ -49,7 +49,7 @@ public interface IContactEventHandler
4949
/// <param name="contactPoint">The world space location of the contact event.</param>
5050
/// <param name="hasCollisionStay">Will be set if this is a collision stay contact event (i.e. it is not the first contact event and continually has contact)</param>
5151
/// <param name="averagedCollisionStayNormal">The average normal of the collision stay contact over time.</param>
52-
void ContactEvent(ulong eventId, Vector3 averagedCollisionNormal, Rigidbody collidingBody, Vector3 contactPoint, bool hasCollisionStay = false, Vector3 averagedCollisionStayNormal = default);
52+
public void ContactEvent(ulong eventId, Vector3 averagedCollisionNormal, Rigidbody collidingBody, Vector3 contactPoint, bool hasCollisionStay = false, Vector3 averagedCollisionStayNormal = default);
5353
}
5454

5555
/// <summary>
@@ -62,7 +62,7 @@ public interface IContactEventHandlerWithInfo : IContactEventHandler
6262
/// Invoked by <see cref="RigidbodyContactEventManager"/> for each set of contact events it is processing (prior to processing).
6363
/// </summary>
6464
/// <returns><see cref="ContactEventHandlerInfo"/></returns>
65-
ContactEventHandlerInfo GetContactEventHandlerInfo();
65+
public ContactEventHandlerInfo GetContactEventHandlerInfo();
6666
}
6767

6868
/// <summary>

com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1623,12 +1623,8 @@ internal void ShutdownInternal()
16231623

16241624
// Shutdown connection manager last which shuts down transport
16251625
ConnectionManager.Shutdown();
1626-
1627-
if (MessageManager != null)
1628-
{
1629-
MessageManager.Dispose();
1630-
MessageManager = null;
1631-
}
1626+
MessageManager?.Dispose();
1627+
MessageManager = null;
16321628

16331629
// Let the NetworkSceneManager clean up its two SceneEvenData instances
16341630
SceneManager?.Dispose();
@@ -1745,9 +1741,9 @@ private void OnDestroy()
17451741
/// </summary>
17461742
internal interface INetworkManagerHelper
17471743
{
1748-
bool NotifyUserOfNestedNetworkManager(NetworkManager networkManager, bool ignoreNetworkManagerCache = false, bool editorTest = false);
1744+
public bool NotifyUserOfNestedNetworkManager(NetworkManager networkManager, bool ignoreNetworkManagerCache = false, bool editorTest = false);
17491745

1750-
void CheckAndNotifyUserNetworkObjectRemoved(NetworkManager networkManager, bool editorTest = false);
1746+
public void CheckAndNotifyUserNetworkObjectRemoved(NetworkManager networkManager, bool editorTest = false);
17511747

17521748
internal NetcodeAnalytics Analytics();
17531749
}

com.unity.netcode.gameobjects/Runtime/Core/NetworkObject.cs

Lines changed: 50 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,8 @@ public void DeferDespawn(int tickOffset, bool destroy = true)
508508
/// In order for this status to be applied, the the <see cref="NetworkObject"/> must have the <see cref="OwnershipStatus.RequestRequired"/>
509509
/// flag set and a non-owner client must have sent a request via <see cref="RequestOwnership"/>.
510510
/// </summary>
511-
public bool IsRequestInProgress => ((OwnershipStatusExtended)Ownership).HasFlag(OwnershipStatusExtended.Requested);
511+
public bool IsRequestInProgress =>
512+
((OwnershipStatusExtended)Ownership).HasFlag(OwnershipStatusExtended.Requested);
512513

513514
/// <summary>
514515
/// Determines whether a NetworkObject can be distributed to other clients during
@@ -2852,18 +2853,54 @@ internal struct SerializedObject
28522853
internal ushort GetBitsetRepresentation()
28532854
{
28542855
ushort bitset = 0;
2855-
if (IsPlayerObject) { bitset |= k_IsPlayerObject; };
2856-
if (HasParent) { bitset |= k_HasParent; };
2857-
if (IsSceneObject) { bitset |= k_IsSceneObject; };
2858-
if (HasTransform) { bitset |= k_HasTransform; };
2859-
if (IsLatestParentSet) { bitset |= k_IsLatestParentSet; };
2860-
if (WorldPositionStays) { bitset |= k_WorldPositionStays; };
2861-
if (DestroyWithScene) { bitset |= k_DestroyWithScene; };
2862-
if (DontDestroyWithOwner) { bitset |= k_DontDestroyWithOwner; };
2863-
if (HasOwnershipFlags) { bitset |= k_HasOwnershipFlags; };
2864-
if (SyncObservers) { bitset |= k_SyncObservers; };
2865-
if (SpawnWithObservers) { bitset |= k_SpawnWithObservers; };
2866-
if (HasInstantiationData) { bitset |= k_HasInstantiationData; };
2856+
if (IsPlayerObject)
2857+
{
2858+
bitset |= k_IsPlayerObject;
2859+
}
2860+
if (HasParent)
2861+
{
2862+
bitset |= k_HasParent;
2863+
}
2864+
if (IsSceneObject)
2865+
{
2866+
bitset |= k_IsSceneObject;
2867+
}
2868+
if (HasTransform)
2869+
{
2870+
bitset |= k_HasTransform;
2871+
}
2872+
if (IsLatestParentSet)
2873+
{
2874+
bitset |= k_IsLatestParentSet;
2875+
}
2876+
if (WorldPositionStays)
2877+
{
2878+
bitset |= k_WorldPositionStays;
2879+
}
2880+
if (DestroyWithScene)
2881+
{
2882+
bitset |= k_DestroyWithScene;
2883+
}
2884+
if (DontDestroyWithOwner)
2885+
{
2886+
bitset |= k_DontDestroyWithOwner;
2887+
}
2888+
if (HasOwnershipFlags)
2889+
{
2890+
bitset |= k_HasOwnershipFlags;
2891+
}
2892+
if (SyncObservers)
2893+
{
2894+
bitset |= k_SyncObservers;
2895+
}
2896+
if (SpawnWithObservers)
2897+
{
2898+
bitset |= k_SpawnWithObservers;
2899+
}
2900+
if (HasInstantiationData)
2901+
{
2902+
bitset |= k_HasInstantiationData;
2903+
}
28672904
return bitset;
28682905
}
28692906

com.unity.netcode.gameobjects/Runtime/Core/NetworkUpdateLoop.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public interface INetworkUpdateSystem
1515
/// The update method that is being executed in the context of related <see cref="NetworkUpdateStage"/>.
1616
/// </summary>
1717
/// <param name="updateStage">The <see cref="NetworkUpdateStage"/> that is being executed.</param>
18-
void NetworkUpdate(NetworkUpdateStage updateStage);
18+
public void NetworkUpdate(NetworkUpdateStage updateStage);
1919
}
2020

2121
/// <summary>

com.unity.netcode.gameobjects/Runtime/Messaging/IDeferredNetworkMessageManager.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ internal enum TriggerType
1818
/// There is a one second maximum lifetime of triggers to avoid memory leaks. After one second has passed
1919
/// without the requested object ID being spawned, the triggers for it are automatically deleted.
2020
/// </summary>
21-
void DeferMessage(TriggerType trigger, ulong key, FastBufferReader reader, ref NetworkContext context, string messageType = null);
21+
public void DeferMessage(TriggerType trigger, ulong key, FastBufferReader reader, ref NetworkContext context, string messageType = null);
2222

2323
/// <summary>
2424
/// Cleans up any trigger that's existed for more than a second.
2525
/// These triggers were probably for situations where a request was received after a despawn rather than before a spawn.
2626
/// </summary>
27-
void CleanupStaleTriggers();
27+
public void CleanupStaleTriggers();
2828

29-
void ProcessTriggers(TriggerType trigger, ulong key);
29+
public void ProcessTriggers(TriggerType trigger, ulong key);
3030

3131
/// <summary>
3232
/// Cleans up any trigger that's existed for more than a second.
3333
/// These triggers were probably for situations where a request was received after a despawn rather than before a spawn.
3434
/// </summary>
35-
void CleanupAllTriggers();
35+
public void CleanupAllTriggers();
3636
}
3737
}

0 commit comments

Comments
 (0)