Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    UpdateEngine Class

    Namespace: Stride.Updater
    Assembly: Stride.Engine.dll

    Efficiently updates values on objects using property paths.

    System.Object → UpdateEngine
    Derived from UpdateEngine:

    public static class UpdateEngine
    Name Description
    Methods
    Compile(Type, List<UpdateMemberInfo>)

    Compiles a list of update operations into a CompiledUpdate, for use with Run(Object, CompiledUpdate, IntPtr, UpdateObjectData[]).

    RegisterMember(Type, String, UpdatableMember)

    Registers a new member for a given type and name.

    RegisterMemberResolver(UpdateMemberResolver)
    Run(Object, CompiledUpdate, IntPtr, UpdateObjectData[])

    Updates the specified object with new data.

    | Improve this Doc View Source

    Methods


    Compile(Type, List<UpdateMemberInfo>)

    Compiles a list of update operations into a CompiledUpdate, for use with Run(Object, CompiledUpdate, IntPtr, UpdateObjectData[]).

    public static CompiledUpdate Compile(Type rootObjectType, List<UpdateMemberInfo> animationPaths)
    Parameters
    Type Name Description
    System.Type rootObjectType

    The type of the root object.

    System.Collections.Generic.List<UpdateMemberInfo> animationPaths

    The different paths and source offsets to use when Run(Object, CompiledUpdate, IntPtr, UpdateObjectData[]) is applied.

    Returns
    Type Description
    CompiledUpdate

    A CompiledUpdate object that can be used for Run(Object, CompiledUpdate, IntPtr, UpdateObjectData[]).


    RegisterMember(Type, String, UpdatableMember)

    Registers a new member for a given type and name.

    public static void RegisterMember(Type owner, string name, UpdatableMember updatableMember)
    Parameters
    Type Name Description
    System.Type owner

    The owner type.

    System.String name

    The member name.

    UpdatableMember updatableMember

    The member update class to get and set value.


    RegisterMemberResolver(UpdateMemberResolver)

    public static void RegisterMemberResolver(UpdateMemberResolver resolver)
    Parameters
    Type Name Description
    UpdateMemberResolver resolver

    Run(Object, CompiledUpdate, IntPtr, UpdateObjectData[])

    Updates the specified object with new data.

    public static void Run(object target, CompiledUpdate compiledUpdate, IntPtr updateData, UpdateObjectData[] updateObjects)
    Parameters
    Type Name Description
    System.Object target

    The object to update.

    CompiledUpdate compiledUpdate

    The precompiled list of update operations, generated by Compile(Type, List<UpdateMemberInfo>).

    System.IntPtr updateData

    The data source for blittable struct.

    UpdateObjectData[] updateObjects

    The data source for objects and non-blittable struct


    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation