I have a Prefab which has an empty gameobject. A child of it is animated with Animation(CTRL+6) so it has the Animator Component.
From outside i now want to change the animation speed of that specific animation.
i tried:
MolePrefab.GetComponentInChildren()[“MoleUp”].speed = cur_animspeed;
and
MolePrefab.GetComponentInChildren().speed = cur_animspeed;
but none works.
The first just don’t have that option. The second gives me a null reference.
Any Idea how this works?
Thanks in advance