Skip to content

fix: PVP issues related to assemblies, file names, and other non-xml-API related #3444

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

Draft
wants to merge 12 commits into
base: develop-2.0.0
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions com.unity.netcode.gameobjects/Editor/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#if UNITY_INCLUDE_TESTS
#if UNITY_EDITOR
[assembly: InternalsVisibleTo("Unity.Netcode.EditorTests")]
[assembly: InternalsVisibleTo("TestProject.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.Netcode.Editor.Tests")]
[assembly: InternalsVisibleTo("TestProject.Runtime.Tests")]
#endif // UNITY_EDITOR
#endif // UNITY_INCLUDE_TESTS
16 changes: 9 additions & 7 deletions com.unity.netcode.gameobjects/Runtime/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,24 @@
[assembly: InternalsVisibleTo("Unity.Netcode.Editor")]
[assembly: InternalsVisibleTo("Unity.Netcode.Editor.CodeGen")]
#endif // UNITY_EDITOR
#if MULTIPLAYER_TOOLS
[assembly: InternalsVisibleTo("Unity.Multiplayer.Tools.Adapters.Ngo1WithUtp2")]
#endif // MULTIPLAYER_TOOLS

#if COM_UNITY_NETCODE_ADAPTER_UTP
[assembly: InternalsVisibleTo("Unity.Netcode.Adapter.UTP")]
#endif // COM_UNITY_NETCODE_ADAPTER_UTP

#if UNITY_INCLUDE_TESTS
[assembly: InternalsVisibleTo("Unity.Netcode.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.Netcode.Runtime.Tests")]
[assembly: InternalsVisibleTo("Unity.Netcode.TestHelpers.Runtime")]
[assembly: InternalsVisibleTo("TestProject.RuntimeTests")]
[assembly: InternalsVisibleTo("TestProject.Runtime.Tests")]
#if UNITY_EDITOR
[assembly: InternalsVisibleTo("Unity.Netcode.EditorTests")]
[assembly: InternalsVisibleTo("TestProject.EditorTests")]
[assembly: InternalsVisibleTo("Unity.Netcode.Editor.Tests")]
[assembly: InternalsVisibleTo("TestProject.Editor.Tests")]
#endif // UNITY_EDITOR

#if MULTIPLAYER_TOOLS
[assembly: InternalsVisibleTo("Unity.Multiplayer.Tools.GameObjects.Tests")]
[assembly: InternalsVisibleTo("Unity.Multiplayer.Tools.Adapters.Ngo1WithUtp2")]
[assembly: InternalsVisibleTo("TestProject.ToolsIntegration.RuntimeTests")]
[assembly: InternalsVisibleTo("TestProject.Netcode.GameObjejct.Runtime.Tests")]
#endif // MULTIPLAYER_TOOLS
#endif // UNITY_INCLUDE_TESTS
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ public void NetworkSerialize<T>(BufferSerializer<T> serializer) where T : IReade
if (HasScaleChange)
{
// If we are teleporting (which includes synchronizing) and the associated NetworkObject has a parent
// then we want to serialize the LossyScale since NetworkObject spawn order is not guaranteed
// then we want to serialize the LossyScale since NetworkObject spawn order is not guaranteed
if (IsTeleportingNextFrame && IsParented)
{
serializer.SerializeValue(ref LossyScale);
Expand Down Expand Up @@ -1014,7 +1014,7 @@ public enum InterpolationTypes
/// Uses a 1 to 2 phase smooth dampening approach where:<br />
/// <list type="bullet">
/// <item><description>The first phase smooth dampens towards the current tick state update being processed by the accumulated delta time relative to the time to target.</description></item>
/// <item><description>The second phase (optional) performs lerp smoothing where the current respective transform value is lerped towards the result of the third phase at a rate of delta time divided by the respective max interpolation time.</description></item>
/// <item><description>The second phase (optional) performs lerp smoothing where the current respective transform value is lerped towards the result of the first phase at a rate of delta time divided by the respective max interpolation time.</description></item>
/// </list>
/// </summary>
/// <remarks>
Expand Down Expand Up @@ -3726,13 +3726,13 @@ internal void ChildRegistration(NetworkObject child, bool isAdding)

/// <inheritdoc/>
/// <remarks>
/// When not using a NetworkRigidbody and using an owner authoritative motion model, you can <br />
/// When not using a NetworkRigidbody and using an owner authoritative motion model, you can<br />
/// improve parenting transitions into and out of world and local space by:<br />
/// - Disabling <see cref="NetworkObject.SyncOwnerTransformWhenParented"/><br />
/// - Enabling <see cref="NetworkObject.AllowOwnerToParent"/><br />
/// - Enabling <see cref="SwitchTransformSpaceWhenParented"/><br />
/// -- Note: This handles changing from world space to local space for you.<br />
/// When these settings are applied, transitioning from: <br />
/// When these settings are applied, transitioning from:<br />
/// - World space to local space (root-null parent/null to <see cref="NetworkObject"/> parent)
/// - Local space back to world space (<see cref="NetworkObject"/> parent to root-null parent)
/// - Local space to local space (<see cref="NetworkObject"/> parent to <see cref="NetworkObject"/> parent)
Expand Down Expand Up @@ -4101,12 +4101,12 @@ private void UpdateInterpolation()
}

// Note: This is for the legacy lerp type in order to maintain the same end result for any games under development that have tuned their
// project's to match the legacy lerp's end result. This will not allow changes
// project's to match the legacy lerp's end result.
var cachedRenderTime = 0.0;
if (PositionInterpolationType == InterpolationTypes.LegacyLerp || RotationInterpolationType == InterpolationTypes.LegacyLerp || ScaleInterpolationType == InterpolationTypes.LegacyLerp)
{
// Since InterpolationBufferTickOffset defaults to zero, this should not impact exist projects but still provides users with the ability to tweak
// their ticks ago time.
// their ticks ago time.
var ticksAgo = (!IsServerAuthoritative() && !IsServer ? 2 : 1) + InterpolationBufferTickOffset;
cachedRenderTime = timeSystem.TimeTicksAgo(ticksAgo).Time;
}
Expand Down Expand Up @@ -4533,7 +4533,7 @@ internal static void UpdateNetworkTick(NetworkManager networkManager)
/// </summary>
/// <remarks>
/// Note: You can adjust this value during runtime. Increasing this value will set non-authority instances that much further
/// behind the authority instance but will increase the number of state updates to be processed. Increasing this can be useful
/// behind the authority instance but will increase the number of state updates to be processed. Increasing this can be useful
/// under higher latency conditions.<br />
/// The default value is 1 tick (plus the tick latency). When running on a local network, reducing this to 0 is recommended.<br />
/// <see cref="NetworkTimeSystem.TickLatency"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ private void HandleOwnershipChange(ref NetworkContext context)

if (originalOwner == networkManager.LocalClientId && !networkManager.DistributedAuthorityMode)
{
// Fully synchronize NetworkVariables with either read or write ownership permissions.
// Fully synchronize NetworkVariables with either read or write ownership permissions.
networkObject.SynchronizeOwnerNetworkVariables(originalOwner, networkObject.PreviousOwnerId);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
using System.Runtime.CompilerServices;

#if UNITY_INCLUDE_TESTS
[assembly: InternalsVisibleTo("Unity.Netcode.RuntimeTests")]
[assembly: InternalsVisibleTo("TestProject.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.Netcode.Runtime.Tests")]
[assembly: InternalsVisibleTo("TestProject.Runtime.Tests")]
#if UNITY_EDITOR
[assembly: InternalsVisibleTo("Unity.Netcode.Editor")]
[assembly: InternalsVisibleTo("TestProject.EditorTests")]
[assembly: InternalsVisibleTo("Unity.Netcode.Editor.Tests")]
[assembly: InternalsVisibleTo("TestProject.Editor.Tests")]
#endif // UNITY_EDITOR
#if MULTIPLAYER_TOOLS
[assembly: InternalsVisibleTo("Unity.Multiplayer.Tools.GameObjects.Tests")]
[assembly: InternalsVisibleTo("TestProject.ToolsIntegration.RuntimeTests")]
#endif // MULTIPLAYER_TOOLS
#endif // UNITY_INCLUDE_TESTS

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading