von Mike Ton Vor 7 Jahren
469
Mehr dazu
static
void
(processors)
(AnimatorStateTransition, AnimatorState)
ProcessStateTransitions
// Ugh. No way to relate AnimatorState to it's AnimatorStateMachine. Must pass in on call...
(Motion, AnimatorState)
ProcessAnimatorMotions
ControllerSetup()
if (Selection.activeObject is AnimatorController) { ... }
var animatorController = AssetDatabase.LoadAssetAtPath
var animatorControllerPath = AssetDatabase.GetAssetPath(Selection.activeObject);
[MenuItem("Assets/AnimatorSetup/ControllerSetup")]
TODO :
Non Base Layers
if clips are empty
Bring Layer influence level == 0
Don't populate
if transitioning to empty clip
TURN OFF hasExitTime
if (populated)
UNDO THESE SETTINGS
(Stepped Transition)
TransitionOffSet = 0
TransitionDuration = 0
(SKIP)
InterruptionSource = NextState
Has Exit Time == False
(Conditions)
SKIP_EMPTYCLIP_TRUE = True
When set to false, animation will be stuck if there are no conditions to transition it forward
(config)
OUT
// Easy
IN
// UGH...must loop through all transition and match up destination name to current AnimatorState and Collect entries. Sucks.
Bool
SKIP_EMPTYCLIP_TRUE
(must be true)
Trigger
// Auto set to false, on set to true
Int
Float
AnimatorControllerLayer[]
"Loop"
"Base Layer"
AnimatorStateMachine
anyStateTransitions
ChildAnimatorStateMachine[]
ChildAnimatorState[]
AnimatorState
AnimatorStateTransition
.destinationStateMachine
.destinationState
// Ugh. No sourceState, Must pass in on call...
Motion
BlendTree