- Home /
StateMachineBehaviour -- instantiate variables
Hi
I have a very simple Animator Controller - "AC"
AC contains 4 states, State_1 to State_4
For each state is added the same script "ScriptBehavior"
Script is very simple, it contains one variable "MyValue" of type int
MyValue has different values for different 4 States
I can change the states using the parameter "Go_To _Next"
The question is simple. If I run it.
1) How many instances will be create for MyValue? One for each State or one for all ?
2) Will the answer be the same if I add SharedBetweenAnimatorsAttribute?
Thanks for your help :)
Your answer
Follow this Question
Related Questions
moving gameobject from state machine behaviour/different code result from inside OnStateExit() 1 Answer
State Machine Behaviours not executing when changing animators at runtime 0 Answers
[StateMachineBehaviours] All prefabs share same state machine. 0 Answers
State Machine Behaviour OnStateEnter Check previous state? 1 Answer
Unity 5 - new Animator State machine behaviour: ca we use UnityScript? 1 Answer