docs.unity3d.com
    Show / Hide Table of Contents

    Struct ForceNetworkSerializeByMemcpy<T>

    This is a wrapper that adds INetworkSerializeByMemcpy support to existing structs that the developer doesn't have the ability to modify (for example, external structs like Guid).

    Inherited Members
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.Netcode
    Syntax
    public struct ForceNetworkSerializeByMemcpy<T> : INetworkSerializeByMemcpy, IEquatable<ForceNetworkSerializeByMemcpy<T>> where T : struct, IEquatable<T>
    Type Parameters
    Name Description
    T

    Constructors

    ForceNetworkSerializeByMemcpy(T)

    The default constructor for ForceNetworkSerializeByMemcpy<T>

    Declaration
    public ForceNetworkSerializeByMemcpy(T value)
    Parameters
    Type Name Description
    T value

    sets the initial value of type T

    Fields

    Value

    The wrapped value

    Declaration
    public T Value
    Field Value
    Type Description
    T

    Methods

    Equals(Object)

    Check if this value is equal to a boxed object value

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    The boxed value to check against

    Returns
    Type Description
    Boolean

    true if equal

    Overrides
    ValueType.Equals(Object)

    Equals(ForceNetworkSerializeByMemcpy<T>)

    Check if wrapped values are equal

    Declaration
    public bool Equals(ForceNetworkSerializeByMemcpy<T> other)
    Parameters
    Type Name Description
    ForceNetworkSerializeByMemcpy<T> other

    Other wrapper

    Returns
    Type Description
    Boolean

    true if equal

    Implements
    IEquatable<T>.Equals(T)

    GetHashCode()

    Obtains the wrapped value's hash code

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    Wrapped value's hash code

    Overrides
    ValueType.GetHashCode()

    Operators

    Implicit(T to ForceNetworkSerializeByMemcpy<T>)

    Convert implicitly from a T value to a ForceNetworkSerializeByMemcpy wrapper

    Declaration
    public static implicit operator ForceNetworkSerializeByMemcpy<T>(T underlyingValue)
    Parameters
    Type Name Description
    T underlyingValue

    the value

    Returns
    Type Description
    ForceNetworkSerializeByMemcpy<T>

    a new wrapper

    Implicit(ForceNetworkSerializeByMemcpy<T> to T)

    Convert implicitly from the ForceNetworkSerializeByMemcpy wrapper to the underlying value

    Declaration
    public static implicit operator T(ForceNetworkSerializeByMemcpy<T> container)
    Parameters
    Type Name Description
    ForceNetworkSerializeByMemcpy<T> container

    The wrapper

    Returns
    Type Description
    T

    The underlying value

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023