Search Results for

    Show / Hide Table of Contents

    Class NetworkPropertySync<K, V>

    Provides an abstraction to track changes on a property contained in a NetworkPropertiesTable. A NetworkPropertiesTable component is needed in the same entity or any of its parents. This class simplifies access to the property value with the methods ReadValue(NetworkPropertiesTable) and WriteValue(NetworkPropertiesTable, V).

    Inheritance
    object
    IdentifiableObject
    DependencyObject
    AttachableObject
    PrefabInstanceObject
    Component
    NetworkPropertySync<K, V>
    NetworkBooleanPropertySync<K>
    NetworkByteArrayPropertySync<K>
    NetworkBytePropertySync<K>
    NetworkColorPropertySync<K>
    NetworkDateTimePropertySync<K>
    NetworkEndpointPropertySync<K>
    NetworkFloatPropertySync<K>
    NetworkIntegerPropertySync<K>
    NetworkLongIntegerPropertySync<K>
    NetworkMatrix3x3PropertySync<K>
    NetworkMatrix4x4PropertySync<K>
    NetworkQuaternionPropertySync<K>
    NetworkSerializablePropertySync<K, V>
    NetworkStringPropertySync<K>
    NetworkTimeSpanPropertySync<K>
    NetworkVector2PropertySync<K>
    NetworkVector3PropertySync<K>
    NetworkVector4PropertySync<K>
    Implements
    IDependencyObject
    Inherited Members
    Component.Owner
    Component.Managers
    Component.ShouldBeActivated
    Component.Clone()
    Component.Attach(Entity)
    Component.OnLoaded()
    Component.Start()
    Component.OnDestroy()
    PrefabInstanceObject.PrefabSource
    PrefabInstanceObject.RefreshPrefab(Prefab)
    PrefabInstanceObject.PrefabElementId
    PrefabInstanceObject.IsPrefabInstance
    PrefabInstanceObject.IsMissingPrefabSource
    AttachableObject.AttachableStateChanged
    AttachableObject.IsEnabled
    AttachableObject.State
    AttachableObject.IsLoaded
    AttachableObject.IsAttached
    AttachableObject.IsActivated
    AttachableObject.IsStarted
    AttachableObject.IsDestroyed
    AttachableObject.Destroy()
    AttachableObject.DependencyBroken()
    DependencyObject.Dependencies
    DependencyObject.OnDependencyRemoved
    IdentifiableObject.Id
    IdentifiableObject.IdHasChanged(Guid)
    Namespace: Evergine.Networking.Components
    Assembly: Evergine.Networking.dll
    Syntax
    public abstract class NetworkPropertySync<K, V> : Component, IDependencyObject where K : struct, IConvertible
    Type Parameters
    Name Description
    K

    The type of the property key. Must be byte or Enum.

    V

    The type of the property value.

    Constructors

    NetworkPropertySync()

    Initializes a new instance of the NetworkPropertySync<K, V> class.

    Declaration
    public NetworkPropertySync()

    Fields

    propertiesTableProvider

    The NetworkCustomPropertiesProvider provider.

    Declaration
    protected NetworkCustomPropertiesProvider propertiesTableProvider
    Field Value
    Type Description
    NetworkCustomPropertiesProvider

    Properties

    HasValue

    Gets a value indicating whether the custom property table has a value defined for this PropertyKey.

    Declaration
    public bool HasValue { get; }
    Property Value
    Type Description
    bool

    IsLocalPlayerProvider

    Gets a value indicating whether the custom property originates from the local player NetworkPropertiesTable.

    Declaration
    public bool IsLocalPlayerProvider { get; }
    Property Value
    Type Description
    bool

    IsReady

    Gets a value indicating whether this instance is ready to synchronize the property value.

    Declaration
    public bool IsReady { get; }
    Property Value
    Type Description
    bool

    PropertyKey

    Gets or sets the key for the custom property.

    Declaration
    [RenderProperty(Tooltip = "The key of the custom property")]
    public K PropertyKey { get; set; }
    Property Value
    Type Description
    K

    PropertyKeyByte

    Gets or sets the property key stored as a byte.

    Declaration
    public byte PropertyKeyByte { get; set; }
    Property Value
    Type Description
    byte

    PropertyValue

    Gets or sets the value of the custom property.

    Declaration
    public V PropertyValue { get; set; }
    Property Value
    Type Description
    V

    ProviderFilter

    Gets or sets a value that restricts which NetworkCustomPropertiesProvider is valid during the resolution of dependencies.

    Declaration
    [RenderProperty(Tooltip = "Restricts which provider is valid during the resolution of dependencies")]
    public NetworkPropertyProviderFilter ProviderFilter { get; set; }
    Property Value
    Type Description
    NetworkPropertyProviderFilter

    Methods

    OnActivated()

    Invoked when the object is activated once it is attached.

    Declaration
    protected override void OnActivated()
    Overrides
    Component.OnActivated()

    OnAttached()

    Invoked when the object is attached to the system.

    Declaration
    protected override bool OnAttached()
    Returns
    Type Description
    bool

    True if everything is OK.

    Overrides
    Component.OnAttached()

    OnDeactivated()

    Invoked when the object is deactivated.

    Declaration
    protected override void OnDeactivated()
    Overrides
    Component.OnDeactivated()

    OnDetach()

    Invoked when the object is detached.

    Declaration
    protected override void OnDetach()
    Overrides
    Component.OnDetach()

    OnPropertyAddedOrChanged()

    Called each time a value with the target property key is added or modified.

    Declaration
    protected abstract void OnPropertyAddedOrChanged()

    OnPropertyReadyToSet()

    Called whenever the target property is ready to be set.

    Declaration
    protected virtual void OnPropertyReadyToSet()

    OnPropertyRemoved()

    Called whenever a value with the target property key is removed.

    Declaration
    protected abstract void OnPropertyRemoved()

    ReadValue(NetworkPropertiesTable)

    Defines a delegate to read the value from the player's NetworkPropertiesTable.

    Declaration
    protected abstract V ReadValue(NetworkPropertiesTable propertiesTable)
    Parameters
    Type Name Description
    NetworkPropertiesTable propertiesTable

    The properties table that contains the player's custom properties.

    Returns
    Type Description
    V

    The property value.

    WriteValue(NetworkPropertiesTable, V)

    Defines a delegate to write the value in the player's NetworkPropertiesTable.

    Declaration
    protected abstract void WriteValue(NetworkPropertiesTable propertiesTable, V value)
    Parameters
    Type Name Description
    NetworkPropertiesTable propertiesTable

    The properties table that contains the player's custom properties.

    V value

    The value to write.

    Implements

    IDependencyObject

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX