breaking: Obsolete Experimental NetworkTransform

* breaking: obsolete old experimental NetworkTransform components

* Update Assets/Mirror/Components/Experimental/NetworkTransform.cs

* Update Assets/Mirror/Components/Experimental/NetworkTransformChild.cs

* Update Assets/Mirror/Components/Experimental/NetworkTransformBase.cs

Co-authored-by: MrGadget <9826063+MrGadget1024@users.noreply.github.com>

BREAKING: Obsolete Experimental NetworkTransform
This commit is contained in:
vis2k 2022-01-18 13:24:30 +08:00 committed by GitHub
parent e192dae48e
commit 05e62388d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 7 deletions

View File

@ -1,10 +1,11 @@
using UnityEngine;
using System;
using UnityEngine;
namespace Mirror.Experimental
{
[DisallowMultipleComponent]
[AddComponentMenu("Network/Experimental/NetworkTransformExperimental")]
[HelpURL("https://mirror-networking.gitbook.io/docs/components/network-transform")]
// Deprecated 2022-01-18
[Obsolete("Use the default NetworkTransform instead, it has proper snapshot interpolation.")]
public class NetworkTransform : NetworkTransformBase
{
protected override Transform targetTransform => transform;

View File

@ -21,6 +21,8 @@
namespace Mirror.Experimental
{
// Deprecated 2022-01-18
[Obsolete("Use the default NetworkTransform instead, it has proper snapshot interpolation.")]
public abstract class NetworkTransformBase : NetworkBehaviour
{
// target transform to sync. can be on a child.
@ -461,7 +463,7 @@ void RpcTeleport(Vector3 newPosition, uint newPackedRotation, bool isClientAutho
{
DoTeleport(newPosition, Compression.DecompressQuaternion(newPackedRotation));
// only send finished if is owner and is ClientAuthority on server
// only send finished if is owner and is ClientAuthority on server
if (hasAuthority && isClientAuthority)
CmdTeleportFinished();
}

View File

@ -1,4 +1,5 @@
using UnityEngine;
using System;
using UnityEngine;
namespace Mirror.Experimental
{
@ -6,8 +7,8 @@ namespace Mirror.Experimental
/// A component to synchronize the position of child transforms of networked objects.
/// <para>There must be a NetworkTransform on the root object of the hierarchy. There can be multiple NetworkTransformChild components on an object. This does not use physics for synchronization, it simply synchronizes the localPosition and localRotation of the child transform and lerps towards the received values.</para>
/// </summary>
[AddComponentMenu("Network/Experimental/NetworkTransformChildExperimentalExperimental")]
[HelpURL("https://mirror-networking.gitbook.io/docs/components/network-transform-child")]
// Deprecated 2022-01-18
[Obsolete("Use the default NetworkTransform instead, it has proper snapshot interpolation.")]
public class NetworkTransformChild : NetworkTransformBase
{
[Header("Target")]