Class NetworkTransformChild | Multiplayer HLAPI | 1.0.8
docs.unity.cn
    Show / Hide Table of Contents

    Class NetworkTransformChild

    A component to synchronize the position of child transforms of networked objects.

    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 recieved values.

    Inheritance
    Object
    Object
    Component
    Behaviour
    MonoBehaviour
    NetworkBehaviour
    NetworkTransformChild
    Inherited Members
    NetworkBehaviour.localPlayerAuthority
    NetworkBehaviour.isServer
    NetworkBehaviour.isClient
    NetworkBehaviour.isLocalPlayer
    NetworkBehaviour.hasAuthority
    NetworkBehaviour.netId
    NetworkBehaviour.connectionToServer
    NetworkBehaviour.connectionToClient
    NetworkBehaviour.playerControllerId
    NetworkBehaviour.syncVarDirtyBits
    NetworkBehaviour.syncVarHookGuard
    NetworkBehaviour.SendCommandInternal(NetworkWriter, Int32, String)
    NetworkBehaviour.InvokeCommand(Int32, NetworkReader)
    NetworkBehaviour.SendRPCInternal(NetworkWriter, Int32, String)
    NetworkBehaviour.SendTargetRPCInternal(NetworkConnection, NetworkWriter, Int32, String)
    NetworkBehaviour.InvokeRPC(Int32, NetworkReader)
    NetworkBehaviour.SendEventInternal(NetworkWriter, Int32, String)
    NetworkBehaviour.InvokeSyncEvent(Int32, NetworkReader)
    NetworkBehaviour.InvokeSyncList(Int32, NetworkReader)
    NetworkBehaviour.RegisterCommandDelegate(Type, Int32, NetworkBehaviour.CmdDelegate)
    NetworkBehaviour.RegisterRpcDelegate(Type, Int32, NetworkBehaviour.CmdDelegate)
    NetworkBehaviour.RegisterEventDelegate(Type, Int32, NetworkBehaviour.CmdDelegate)
    NetworkBehaviour.RegisterSyncListDelegate(Type, Int32, NetworkBehaviour.CmdDelegate)
    NetworkBehaviour.SetSyncVarGameObject(GameObject, GameObject, UInt32, NetworkInstanceId)
    NetworkBehaviour.SetSyncVar<T>(T, T, UInt32)
    NetworkBehaviour.SetDirtyBit(UInt32)
    NetworkBehaviour.ClearAllDirtyBits()
    NetworkBehaviour.PreStartClient()
    NetworkBehaviour.OnNetworkDestroy()
    NetworkBehaviour.OnStartServer()
    NetworkBehaviour.OnStartClient()
    NetworkBehaviour.OnStartLocalPlayer()
    NetworkBehaviour.OnStartAuthority()
    NetworkBehaviour.OnStopAuthority()
    NetworkBehaviour.OnRebuildObservers(HashSet<NetworkConnection>, Boolean)
    NetworkBehaviour.OnSetLocalVisibility(Boolean)
    NetworkBehaviour.OnCheckObserver(NetworkConnection)
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(String, Single)
    MonoBehaviour.InvokeRepeating(String, Single, Single)
    MonoBehaviour.CancelInvoke(String)
    MonoBehaviour.IsInvoking(String)
    MonoBehaviour.StartCoroutine(String)
    MonoBehaviour.StartCoroutine(String, Object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StartCoroutine_Auto(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(String)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(Object)
    MonoBehaviour.useGUILayout
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.GetComponent(String)
    Component.GetComponentInChildren(Type, Boolean)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(Boolean)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, Boolean)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(Boolean)
    Component.GetComponentsInChildren<T>(Boolean, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, Boolean)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(Boolean)
    Component.GetComponentsInParent<T>(Boolean, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.CompareTag(String)
    Component.SendMessageUpwards(String, Object, SendMessageOptions)
    Component.SendMessageUpwards(String, Object)
    Component.SendMessageUpwards(String)
    Component.SendMessageUpwards(String, SendMessageOptions)
    Component.SendMessage(String, Object)
    Component.SendMessage(String)
    Component.SendMessage(String, Object, SendMessageOptions)
    Component.SendMessage(String, SendMessageOptions)
    Component.BroadcastMessage(String, Object, SendMessageOptions)
    Component.BroadcastMessage(String, Object)
    Component.BroadcastMessage(String)
    Component.BroadcastMessage(String, SendMessageOptions)
    Component.transform
    Component.gameObject
    Component.tag
    Component.rigidbody
    Component.rigidbody2D
    Component.camera
    Component.light
    Component.animation
    Component.constantForce
    Component.renderer
    Component.audio
    UnityEngine.Component.guiText
    Component.networkView
    UnityEngine.Component.guiElement
    UnityEngine.Component.guiTexture
    Component.collider
    Component.collider2D
    Component.hingeJoint
    Component.particleSystem
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectOfType<T>()
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.ToString()
    Object.name
    Object.hideFlags
    Namespace: UnityEngine.Networking
    Syntax
    [AddComponentMenu("Network/NetworkTransformChild")]
    [Obsolete("The high level API classes are deprecated and will be removed in the future.")]
    public class NetworkTransformChild : NetworkBehaviour

    Properties

    childIndex

    A unique Identifier for this NetworkTransformChild component on this root object.

    Declaration
    public uint childIndex { get; }
    Property Value
    Type Description
    UInt32

    clientMoveCallback3D

    A callback function to allow server side validation of the movement of the child object.

    Declaration
    public NetworkTransform.ClientMoveCallback3D clientMoveCallback3D { get; set; }
    Property Value
    Type Description
    NetworkTransform.ClientMoveCallback3D

    interpolateMovement

    The rate to interpolate towards the target position.

    A value of 1 will snap to the position, and lower positive values will interpolate more slowly.

    Declaration
    public float interpolateMovement { get; set; }
    Property Value
    Type Description
    Single

    interpolateRotation

    The rate to interpolate to the target rotation.

    A value of 1 will snap to the position, and lower positive values will interpolate more slowly.

    Declaration
    public float interpolateRotation { get; set; }
    Property Value
    Type Description
    Single

    lastSyncTime

    The most recent time when a movement synchronization packet arrived for this object.

    Declaration
    public float lastSyncTime { get; }
    Property Value
    Type Description
    Single

    movementThreshold

    The distance that an object can move without sending a movement synchronization update.

    This applies to the child object's localPosition, not it's world position.

    Declaration
    public float movementThreshold { get; set; }
    Property Value
    Type Description
    Single

    rotationSyncCompression

    How much to compress rotation sync updates.

    Declaration
    public NetworkTransform.CompressionSyncMode rotationSyncCompression { get; set; }
    Property Value
    Type Description
    NetworkTransform.CompressionSyncMode

    sendInterval

    The sendInterval controls how often state updates are sent for this object.

    Declaration
    public float sendInterval { get; set; }
    Property Value
    Type Description
    Single

    syncRotationAxis

    Which axis should rotation by synchronized for.

    Declaration
    public NetworkTransform.AxisSyncMode syncRotationAxis { get; set; }
    Property Value
    Type Description
    NetworkTransform.AxisSyncMode

    target

    The child transform to be synchronized.

    Declaration
    public Transform target { get; set; }
    Property Value
    Type Description
    Transform

    targetSyncPosition

    The target position interpolating towards.

    Declaration
    public Vector3 targetSyncPosition { get; }
    Property Value
    Type Description
    Vector3

    targetSyncRotation3D

    The target rotation interpolating towards.

    Declaration
    public Quaternion targetSyncRotation3D { get; }
    Property Value
    Type Description
    Quaternion

    Methods

    GetNetworkChannel()

    Declaration
    public override int GetNetworkChannel()
    Returns
    Type Description
    Int32
    Overrides
    NetworkBehaviour.GetNetworkChannel()

    GetNetworkSendInterval()

    Declaration
    public override float GetNetworkSendInterval()
    Returns
    Type Description
    Single
    Overrides
    NetworkBehaviour.GetNetworkSendInterval()

    OnDeserialize(NetworkReader, Boolean)

    Declaration
    public override void OnDeserialize(NetworkReader reader, bool initialState)
    Parameters
    Type Name Description
    NetworkReader reader
    Boolean initialState
    Overrides
    NetworkBehaviour.OnDeserialize(NetworkReader, Boolean)

    OnSerialize(NetworkWriter, Boolean)

    Declaration
    public override bool OnSerialize(NetworkWriter writer, bool initialState)
    Parameters
    Type Name Description
    NetworkWriter writer
    Boolean initialState
    Returns
    Type Description
    Boolean
    Overrides
    NetworkBehaviour.OnSerialize(NetworkWriter, Boolean)
    In This Article
    • Properties
      • childIndex
      • clientMoveCallback3D
      • interpolateMovement
      • interpolateRotation
      • lastSyncTime
      • movementThreshold
      • rotationSyncCompression
      • sendInterval
      • syncRotationAxis
      • target
      • targetSyncPosition
      • targetSyncRotation3D
    • Methods
      • GetNetworkChannel()
      • GetNetworkSendInterval()
      • OnDeserialize(NetworkReader, Boolean)
      • OnSerialize(NetworkWriter, Boolean)
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 15 December 2020