Summary
The main component in
FlexiMotion.FlexiMotionComponent
which holds the core FlexiMotion.FlexiMotionDefinition
and
turns it into a FlexiMotion.FlexiMotionRuntime
to run the simulation.
- Assembly
- FlexiMotion
.dll - Namespace
- FlexiMotion
- Interfaces
- Base Types
-
- MonoBehaviour
graph BT
Type-->Base0["MonoBehaviour"]
Type-.->Interface0["IFlexiMotionComponent"]
click Interface0 "/flexi-motion/api/FlexiMotion/IFlexiMotionComponent"
Type-.->Interface1["IComponent"]
click Interface1 "/flexi-motion/api/FlexiMotion/IComponent"
Type-.->Interface2["IOnValidate"]
click Interface2 "/flexi-motion/api/FlexiMotion/IOnValidate"
Type["FlexiMotionComponent"]
class Type type-node
Syntax
[AddComponentMenu(FMStrings.MenuPrefix + "FlexiMotion Component")]
[HelpURL(FMStrings.DocsURLs.APIDocumentation + "/" + nameof(FlexiMotionComponent))]
public class FlexiMotionComponent : MonoBehaviour, IFlexiMotionComponent, IComponent, IOnValidate
Attributes
Type | Description |
---|---|
AddComponentMenu | |
HelpURLAttribute |
Fields
Name | Constant Value | Summary |
---|---|---|
DefinitionFieldName | _Definition |
The name of the serialized backing field of
FlexiMotion.FlexiMotionComponent.Definition .static
|
Properties
Name | Value | Summary |
---|---|---|
Definition | Flexi |
[
UnityEngine.SerializeField ] Data from which the FlexiMotion.FlexiMotionComponent.Runtime will be initialized. |
Modifiers | JobModifierGroup |
Objects which modify the behaviour of the simulation.
|
Runtime | FlexiMotionRuntime |
The runtime spring simulation details.
|
WasDisabled | bool |
Was this component enabled previously and then disabled?
|
Methods
Name | Value | Summary |
---|---|---|
Initialize |
bool |
Initializes the
FlexiMotion.FlexiMotionComponent.Runtime from the FlexiMotion.FlexiMotionComponent.Definition if it hasn't already been created.
|
OnDestroy |
void |
Cleans up the
FlexiMotion.FlexiMotionComponent.Runtime . |
OnDisable |
void |
Executes the
FlexiMotion.FlexiMotionDefinition.ActionOnDisable . |
OnDrawGizmosSelected |
void |
Draws scene gizmos for the
FlexiMotion.FlexiMotionComponent.Runtime . |
OnEnable |
void |
Initializes the
FlexiMotion.FlexiMotionComponent.Runtime , handles FlexiMotion.FlexiMotionDefinition.ActionOnDisable , and
runs any FlexiMotion.Modifiers.JobModifierGroup.IOnReEnable modifiers if it FlexiMotion.FlexiMotionComponent.WasDisabled .
|
OnValidate |
void |
Re-initializes the runtime to account for any modifications to the
FlexiMotion.FlexiMotionComponent.Definition . |
Reset |
void |
Resets this component to its default values.
|
Extension Methods
Name | Value | Summary |
---|---|---|
LogTemp |
T |
Debug.Log(message, context) with an [System.ObsoleteAttribute ] warning so you remember
to remove any calls.
From FMUtilities
|
SafeGetHashCode |
int |
Uses
System.Collections.Generic.EqualityComparer`1.Default to get a hash code.From FMUtilities
|