Class UpdateEngine
Efficiently updates values on objects using property paths.
public static class UpdateEngine
- Inheritance
-
UpdateEngine
Methods
Compile(Type, List<UpdateMemberInfo>)
Compiles a list of update operations into a CompiledUpdate, for use with Run(object, CompiledUpdate, nint, UpdateObjectData[]).
public static CompiledUpdate Compile(Type rootObjectType, List<UpdateMemberInfo> animationPaths)
Parameters
rootObjectType
TypeThe type of the root object.
animationPaths
List<UpdateMemberInfo>The different paths and source offsets to use when Run(object, CompiledUpdate, nint, UpdateObjectData[]) is applied.
Returns
- CompiledUpdate
A CompiledUpdate object that can be used for Run(object, CompiledUpdate, nint, 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
owner
TypeThe owner type.
name
stringThe member name.
updatableMember
UpdatableMemberThe member update class to get and set value.
RegisterMemberResolver(UpdateMemberResolver)
public static void RegisterMemberResolver(UpdateMemberResolver resolver)
Parameters
resolver
UpdateMemberResolver
Run(object, CompiledUpdate, nint, UpdateObjectData[])
Updates the specified target
object with new data.
public static void Run(object target, CompiledUpdate compiledUpdate, nint updateData, UpdateObjectData[] updateObjects)
Parameters
target
objectThe object to update.
compiledUpdate
CompiledUpdateThe precompiled list of update operations, generated by Compile(Type, List<UpdateMemberInfo>).
updateData
nintThe data source for blittable struct.
updateObjects
UpdateObjectData[]The data source for objects and non-blittable struct