- Home /
Mecanim: NullReferenceException
Hi all, I'm trying to figure out how to rig a model using mecanim.
So I've downloaded a nice model (without any bones). I then added some bones to it and named them appropriately in maya 2013.
Once that was done, I exported my model as FBX and imported it into unity.
I then went to the import settings, in the rig part, set the animation type to "humanoid" and "create from this model" for the avatar definition". Then I went on and click on "configure..."
Once I'm there, I keep getting these errors all the time:
UnityEngine.Transform.get_position () UnityEditor.Handles.DoBoneHandle (UnityEngine.Transform target, System.Collections.Generic.Dictionary`2 validBones) UnityEditor.AvatarSkeletonDrawer.DrawSkeletonSubTree (System.Collections.Generic.Dictionary`2 actualBones, .BoneWrapper[] bones, Quaternion orientation, UnityEngine.Transform tr, Bounds bounds) UnityEditor.AvatarSkeletonDrawer.DrawSkeleton (UnityEngine.Transform reference, System.Collections.Generic.Dictionary`2 actualBones, .BoneWrapper[] bones) UnityEditor.AvatarMappingEditor.OnSceneGUI () UnityEditor.AvatarEditor.OnSceneGUI () System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Applications/buildAgent/work/3df08680c6f85295/mcs/class/corlib/System.Reflection/MonoMethod.cs:222) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Applications/buildAgent/work/3df08680c6f85295/mcs/class/corlib/System.Reflection/MonoMethod.cs:232) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Applications/buildAgent/work/3df08680c6f85295/mcs/class/corlib/System.Reflection/MethodBase.cs:115) UnityEditor.SceneView.CallOnSceneGUI () UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () UnityEditor.SceneView.OnGUI () System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Applications/buildAgent/work/3df08680c6f85295/mcs/class/corlib/System.Reflection/MonoMethod.cs:222) So what's the deal? I've googled this, and came only upon unanswered topics. So can anyone please tell me what I'm doing wrong? Am I missing a step before importing my model in Unity (or perhaps, should I specify some special options in the FBX export)?NullReferenceException
Answer by jeango · Jan 27, 2013 at 05:10 PM
Ok, got this figured out...
rather dumb reason, by the way. It's just that I didn't know you had to bind the mesh to the skeleton and paint the weights in Maya.
Power to the noobs :-)
Your answer
Follow this Question
Related Questions
Null Reference Annoying Error 0 Answers
Simple Script getting Errors. 1 Answer
Despawner script returns null reference exception. 0 Answers
How do I fix this Null Reference error and update my score? 2 Answers
NullReferenceException Error 6 Answers