UpdateEngine Class
Namespace: Stride.UpdaterAssembly: Stride.Engine.dll
Efficiently updates values on objects using property paths.
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 |
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
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 |