FlexiMotionModifier Class

Summary

A component which modifies the behaviour of FlexiMotion.FlexiMotionComponent.
graph BT Type-->Base0["MonoBehaviour"] Type-.->Interface0["IFlexiMotionModifier"] click Interface0 "/flexi-motion/api/FlexiMotion.Modifiers/IFlexiMotionModifier" Type-.->Interface1["IOnValidate"] click Interface1 "/flexi-motion/api/FlexiMotion/IOnValidate" Type["FlexiMotionModifier"] class Type type-node Derived0["AccelerationModifier"]-->Type click Derived0 "/flexi-motion/api/FlexiMotion.Modifiers/AccelerationModifier" Derived1["DistanceBasedUpdateRateModifier"]-->Type click Derived1 "/flexi-motion/api/FlexiMotion.Modifiers/DistanceBasedUpdateRateModifier" Derived2["ScaleModifier"]-->Type click Derived2 "/flexi-motion/api/FlexiMotion.Modifiers/ScaleModifier" Derived3["SphereCollidersModifier"]-->Type click Derived3 "/flexi-motion/api/FlexiMotion.Modifiers/SphereCollidersModifier" Derived4["SimulationRootModifier"]-->Type click Derived4 "/flexi-motion/api/FlexiMotion.Modifiers/SimulationRootModifier" Derived5["PreWarmModifier"]-->Type click Derived5 "/flexi-motion/api/FlexiMotion.Modifiers/PreWarmModifier"

Syntax

[HelpURL(FMStrings.DocsURLs.ModifiersAPIDocumentation + "/" + nameof(FlexiMotionModifier))]
public abstract class FlexiMotionModifier : MonoBehaviour, IFlexiMotionModifier, IOnValidate

Remarks

Modifiers don't need to inherit from this class, it just helps simplify the initialization and cleanup. The actual modifying functionality is implemented via the interfaces in FlexiMotion.Modifiers.JobModifierGroup.

Attributes

Type Description
HelpURLAttribute

Fields

Name Constant Value Summary
TargetFieldName _Target
The name of the serialized backing field of FlexiMotion.Modifiers.FlexiMotionModifier.Target.
static

Properties

Name Value Summary
DeltaTime float
The FlexiMotion.FlexiMotionRuntime.DeltaTime.
Target FlexiMotionComponent

Methods

Name Value Summary
Disable(JobModifierGroup) bool
Registers this modifier in the given FlexiMotion.Modifiers.JobModifierGroup.
Enable(JobModifierGroup) void
Registers this modifier in the given FlexiMotion.Modifiers.JobModifierGroup.
GetUsedBones() IEnumerable<Transform>
Returns the objects that are used by this modifier.
OnDisable() void
Calls FlexiMotion.Modifiers.FlexiMotionModifier.Disable(FlexiMotion.Modifiers.JobModifierGroup) if the FlexiMotion.Modifiers.FlexiMotionModifier.Target is set.
OnEnable() void
Calls FlexiMotion.Modifiers.FlexiMotionModifier.Enable(FlexiMotion.Modifiers.JobModifierGroup) if the FlexiMotion.Modifiers.FlexiMotionModifier.Target is set.
OnValidate() void
Tries to find a FlexiMotion.Modifiers.FlexiMotionModifier.Target if none was assigned.

Extension Methods

Name Value Summary
LogTemp<FlexiMotionModifier>(Object) T
Debug.Log(message, context) with an [System.ObsoleteAttribute] warning so you remember to remove any calls.
SafeGetHashCode<FlexiMotionModifier>() int
Uses System.Collections.Generic.EqualityComparer`1.Default to get a hash code.