• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Shinugami · Dec 14, 2012 at 09:28 PM · mecanimnullreferenceexceptionrigging

Mecanim:Rig:Configure >> NullReferenceError

Trying Mecanim for the first time. I'm trying to map the bones for a model. I named all the bones as they are named in the Mapping tab of the inspector for the configure process of the rigging.

Upon entering the configure mode, there is immediately a null reference exception:

 NullReferenceException
 UnityEngine.Transform.get_position () (at C:/BuildAgent/work/812c4f5049264fad/Runtime/ExportGenerated/Editor/UnityEngineTransform.cs:19)
 UnityEditor.Handles.DoBoneHandle (UnityEngine.Transform target, System.Collections.Generic.Dictionary`2 validBones) (at C:/BuildAgent/work/812c4f5049264fad/Editor/Mono/EditorHandles/BoneHandle.cs:43)
 UnityEditor.AvatarSkeletonDrawer.DrawSkeletonSubTree (System.Collections.Generic.Dictionary`2 actualBones, .BoneWrapper[] bones, Quaternion orientation, UnityEngine.Transform tr, Bounds bounds) (at C:/BuildAgent/work/812c4f5049264fad/Editor/Mono/Inspector/Avatar/AvatarSkeletonDrawer.cs:123)
 UnityEditor.AvatarSkeletonDrawer.DrawSkeleton (UnityEngine.Transform reference, System.Collections.Generic.Dictionary`2 actualBones, .BoneWrapper[] bones) (at C:/BuildAgent/work/812c4f5049264fad/Editor/Mono/Inspector/Avatar/AvatarSkeletonDrawer.cs:56)
 UnityEditor.AvatarMappingEditor.OnSceneGUI () (at C:/BuildAgent/work/812c4f5049264fad/Editor/Mono/Inspector/Avatar/AvatarMappingEditor.cs:745)
 UnityEditor.AvatarEditor.OnSceneGUI () (at C:/BuildAgent/work/812c4f5049264fad/Editor/Mono/Inspector/Avatar/AvatarEditor.cs:402)
 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 () (at C:/BuildAgent/work/812c4f5049264fad/Editor/Mono/SceneView/SceneView.cs:1335)
 UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at C:/BuildAgent/work/812c4f5049264fad/Editor/Mono/SceneView/SceneView.cs:839)
 UnityEditor.SceneView.OnGUI () (at C:/BuildAgent/work/812c4f5049264fad/Editor/Mono/SceneView/SceneView.cs:728)
 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)

I can save my mapping as a .ht file. After I click APPLY the mapping becomes blank with the null reference error again. If I click DONE then Unity crashes. If I restart Unity and try to load my mapping I get the following error:

 NullReferenceException
     UnityEngine.Transform.get_position () (at C:/BuildAgent/work/812c4f5049264fad/Runtime/ExportGenerated/Editor/UnityEngineTransform.cs:19)
     UnityEditor.Handles.DoBoneHandle (UnityEngine.Transform target, System.Collections.Generic.Dictionary`2 validBones) (at C:/BuildAgent/work/812c4f5049264fad/Editor/Mono/EditorHandles/BoneHandle.cs:43)
     UnityEditor.AvatarSkeletonDrawer.DrawSkeletonSubTree (System.Collections.Generic.Dictionary`2 actualBones, .BoneWrapper[] bones, Quaternion orientation, UnityEngine.Transform tr, Bounds bounds) (at C:/BuildAgent/work/812c4f5049264fad/Editor/Mono/Inspector/Avatar/AvatarSkeletonDrawer.cs:123)
     UnityEditor.AvatarSkeletonDrawer.DrawSkeleton (UnityEngine.Transform reference, System.Collections.Generic.Dictionary`2 actualBones, .BoneWrapper[] bones) (at C:/BuildAgent/work/812c4f5049264fad/Editor/Mono/Inspector/Avatar/AvatarSkeletonDrawer.cs:56)
     UnityEditor.AvatarMappingEditor.OnSceneGUI () (at C:/BuildAgent/work/812c4f5049264fad/Editor/Mono/Inspector/Avatar/AvatarMappingEditor.cs:745)

And also this error:

 InvalidOperationException: Operation is not valid due to the current state of the object
 System.Linq.Enumerable.First[Transform] (IEnumerable`1 source, System.Func`2 predicate, Fallback fallback)
 System.Linq.Enumerable.First[Transform] (IEnumerable`1 source, System.Func`2 predicate)
 UnityEditor.AvatarMappingEditor.ApplyTemplate () (at C:/BuildAgent/work/812c4f5049264fad/Editor/Mono/Inspector/Avatar/AvatarMappingEditor.cs:702)
 UnityEditor.GenericMenu.CatchMenu (System.Object userData, System.String[] options, Int32 selected) (at C:/BuildAgent/work/812c4f5049264fad/Editor/MonoGenerated/Editor/GenericMenu.cs:83)

Is anybody familiar with this error and if someone knows how to overcome it may I know how you overcame this? Thankyou.

I can do all the animation via fbx animations but it would be nice to use Mecanim as I can see how it will save me a lot of time.

Any advice would be very much appreciated. Thanks for taking the time to read my question.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image jeango · Dec 31, 2012 at 10:04 AM 0
Share

I second that, I have the same problem, and this question was asked several times with no answer... does no-one know a thing about this?

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Mapping two joints to the same node - mecanim. 1 Answer

How do I create custom animations in mecanim for my Fuse character? 1 Answer

Why does my scene camera zoom in during model rig configuration? 0 Answers

How to load .ht files? 1 Answer

unity rigging issue (finger) 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges