- Home /
Question by
Darkhalo45 · Nov 21, 2017 at 11:23 PM ·
animatorcontrolleroverride
Can't assign Animator Override Controller
I am making a weapon system for my game and whenever I instantiate a new GameObject and set its parent to the Right Arm, which has the Animator Component, the runtimeAnimatorController becomes null.
Item item = slot.InvItem.Item;
GameObject weapon = item.Prefab;
GameObject newWeapon = Instantiate (weapon, playerHandle) as GameObject;
slot.WeaponObject = newWeapon;
newWeapon.transform.localPosition = new Vector3 (0f, 0f, 0f);
newWeapon.transform.localRotation = Quaternion.Euler (0f, 180f, 0f);
rightArmAnimator.runtimeAnimatorController = item.AnimOverride;
equippedSlot = index;
Comment
Your answer
Follow this Question
Related Questions
Avatar Masks and Animator Override Controllers 0 Answers
Can animation clips be swapped out of the animator override controller in runtime? 1 Answer
Get list of parameters of an AnimatorController 3 Answers
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Added a new animation clip to my animator and now I can't look up and down in game 0 Answers