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, IntPtr, 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, IntPtr, UpdateObjectData[]) is applied.
Returns
- 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
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, IntPtr, UpdateObjectData[])
Updates the specified target
object with new data.
public static void Run(object target, CompiledUpdate compiledUpdate, IntPtr updateData, UpdateObjectData[] updateObjects)
Parameters
target
objectThe object to update.
compiledUpdate
CompiledUpdateThe precompiled list of update operations, generated by Compile(Type, List<UpdateMemberInfo>).
updateData
IntPtrThe data source for blittable struct.
updateObjects
UpdateObjectData[]The data source for objects and non-blittable struct