Skip to main content

Unity.Netcode.ForceNetworkSerializeByMemcpy-1

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).

Implements

INetworkSerializeByMemcpy

System.IEquatable\<ForceNetworkSerializeByMemcpy\<T>>

Inherited Members

ValueType.ToString()

Object.Equals(Object, Object)

Object.ReferenceEquals(Object, Object)

Object.GetType()

Namespace: System.Dynamic.ExpandoObject

Assembly: Netcode.dll

Syntax

public struct ForceNetworkSerializeByMemcpy<T> : INetworkSerializeByMemcpy, IEquatable<ForceNetworkSerializeByMemcpy<T>> where T : struct, IEquatable<T>

Type Parameters

NameDescription
T

Constructors

ForceNetworkSerializeByMemcpy(T)

The default constructor for ForceNetworkSerializeByMemcpy\<T>

Declaration

public ForceNetworkSerializeByMemcpy(T value)

Parameters

TypeNameDescription
Tvaluesets the initial value of type T

Fields

Value

The wrapped value

Declaration

public T Value

Field Value

TypeDescription
T

Methods

Equals(Object)

Check if this value is equal to a boxed object value

Declaration

public override bool Equals(object obj)

Parameters

TypeNameDescription
System.ObjectobjThe boxed value to check against

Returns

TypeDescription
System.Booleantrue if equal

Overrides

System.ValueType.Equals(System.Object)

Equals(ForceNetworkSerializeByMemcpy\<T>)

Check if wrapped values are equal

Declaration

public bool Equals(ForceNetworkSerializeByMemcpy<T> other)

Parameters

TypeNameDescription
ForceNetworkSerializeByMemcpy\<T>otherOther wrapper

Returns

TypeDescription
System.Booleantrue if equal

GetHashCode()

Obtains the wrapped value's hash code

Declaration

public override int GetHashCode()

Returns

TypeDescription
System.Int32Wrapped value's hash code

Overrides

System.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

TypeNameDescription
TunderlyingValuethe value

Returns

TypeDescription
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

TypeNameDescription
ForceNetworkSerializeByMemcpy\<T>containerThe wrapper

Returns

TypeDescription
TThe underlying value

Implements

INetworkSerializeByMemcpy

System.IEquatable\<T>