- Home /
Question by
twisted89 · Apr 29, 2014 at 07:24 PM ·
animationnullreferenceexception
animation[""] always null
Using the following code causes a null reference exception, it seems that it can't find the animation even though its on the object.
using UnityEngine;
using System.Collections;
public class MixingDemostration : MonoBehaviour
{
public Transform shoulder;
void Start()
{
animation["RunForward"].AddMixingTransform(shoulder);
}
}
Does anyone know what I'm doing wrong?
Comment
Your answer
Follow this Question
Related Questions
Can the animation editor create local rotational data? 3 Answers
Adding animation clips via script 2 Answers
Nullreferenceexception and resulting animator not playing correct animation 0 Answers
Can I make animations snap to a frame? 1 Answer
NullReferenceException: Object reference not set to an instance of an object 0 Answers