Kategorie: Wszystkie - layers - state - conditions - transition

przez Mike Ton 8 lat temu

625

Unity3D_AnimatorController

Unity3D_AnimatorController

AnimatorController

API

Editor
AnimatorControllerSetup.cs

static

void

(processors)

(AnimatorStateTransition, AnimatorState)

ProcessStateTransitions(AnimatorState state, AnimatorStateMachine machine, Func callBack) {

// Ugh. No way to relate AnimatorState to it's AnimatorStateMachine. Must pass in on call...

(Motion, AnimatorState)

ProcessAnimatorMotions(AnimatorStateMachine animatorStateMachine, Func callBack) { ... }

ControllerSetup()

if (Selection.activeObject is AnimatorController) { ... }

var animatorController = AssetDatabase.LoadAssetAtPath(animatorControllerPath);

var animatorControllerPath = AssetDatabase.GetAssetPath(Selection.activeObject);

[MenuItem("Assets/AnimatorSetup/ControllerSetup")]

structure

Feature
SkipAnimClipState

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.

Parameter

Bool

SKIP_EMPTYCLIP_TRUE

(must be true)

Trigger

// Auto set to false, on set to true

Int

Float

Layers

AnimatorControllerLayer[]

"Loop"

"Base Layer"

AnimatorStateMachine

anyStateTransitions

ChildAnimatorStateMachine[]

ChildAnimatorState[]

AnimatorState

AnimatorStateTransition

.destinationStateMachine

.destinationState

// Ugh. No sourceState, Must pass in on call...

Motion

BlendTree