Interface IPlatformAnimatorBindings
public interface IPlatformAnimatorBindings
Methods
CommitControllers(GameObject, IDictionary<object, RuntimeAnimatorController>)
Updates any innate controllers to reference new animator controllers.
void CommitControllers(GameObject root, IDictionary<object, RuntimeAnimatorController> controllers)
Parameters
root
GameObjectcontrollers
IDictionary<object, RuntimeAnimatorController>
CommitStateBehaviour(CommitContext, StateMachineBehaviour)
Invoked when a StateMachineBehavior is being committed, to allow for any platform-specific modifications. For example, in VRChat, this is used to replace the virtual layer indexes with the actual layer indexes in the VRChatAnimatorLayerControl behavior.
bool CommitStateBehaviour(CommitContext context, StateMachineBehaviour behaviour)
Parameters
context
CommitContextbehaviour
StateMachineBehaviour
Returns
- bool
True to retain this state behavior, false to remove it on commit
GetInnateControllers(GameObject)
Returns any animator controllers that are referenced by platform-specific assets (e.g. VRCAvatarDescriptor). The bool flag indicates whether the controller is overridden (true) or left as default (false).
IEnumerable<(object, RuntimeAnimatorController, bool)> GetInnateControllers(GameObject root)
Parameters
root
GameObject
Returns
- IEnumerable<(object, RuntimeAnimatorController, bool)>
IsSpecialMotion(Motion)
If true, the motion asset should be maintained as-is without replacement or modification.
bool IsSpecialMotion(Motion m)
Parameters
m
Motion
Returns
RemapPathsInStateBehaviour(StateMachineBehaviour, Func<string, string?>)
Invoked when path remappings are being processed to apply any changed mappings to state behaviors. In VRChat, this is used to remap object paths in VRCAnimatorPlayAudio
void RemapPathsInStateBehaviour(StateMachineBehaviour behaviour, Func<string, string?> remapPath)
Parameters
behaviour
StateMachineBehaviourThe behaviour to remap
remapPath
Func<string, string>A function which remaps old paths to new paths (or to null, if the corresponding object was deleted)
VirtualizeStateBehaviour(CloneContext, StateMachineBehaviour)
Invoked after a StateMachineBehavior is cloned, to allow for any platform-specific modifications. For example, in VRChat, this is used to replace the layer indexes with virtual layer indexes in the VRChatAnimatorLayerControl behavior.
Note that, if we're re-activating the virtual animator controller after committing, this will be re-invoked with the same behaviour it had previously cloned. This allows for again converting between virtual and physical layer indexes.
void VirtualizeStateBehaviour(CloneContext context, StateMachineBehaviour behaviour)
Parameters
context
CloneContextbehaviour
StateMachineBehaviour