Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • 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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
19
Question by Xelnath · Mar 13, 2015 at 12:13 AM · animationmechanim

Spammed with a Null Reference exception in Animator

I don't know how to track down what asset is missing... this is an editor error, not an in-game issue.

Works fine in-game.

However, my game started taking 20-50 seconds to load after this error began:

 NullReferenceException: Object reference not set to an instance of an object
 UnityEditor.Graphs.AnimationStateMachine.TransitionEditionContext.BuildNames () (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/AnimationStateMachine/TransitionEditionContext.cs:44)
 UnityEditor.Graphs.AnimationStateMachine.TransitionEditionContext..ctor (UnityEditor.Animations.AnimatorTransitionBase aTransition, UnityEditor.Animations.AnimatorState aSourceState, UnityEditor.Animations.AnimatorStateMachine aSourceStateMachine, UnityEditor.Animations.AnimatorStateMachine aOwnerStateMachine) (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/AnimationStateMachine/TransitionEditionContext.cs:28)
 UnityEditor.Graphs.AnimationStateMachine.AnimatorTransitionInspectorBase.ComputeTransitionContexts () (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/AnimationStateMachine/AnimatorTransitionInspectorBase.cs:125)
 UnityEditor.Graphs.AnimationStateMachine.AnimatorTransitionInspectorBase.OnEnable () (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/AnimationStateMachine/AnimatorTransitionInspectorBase.cs:87)
 UnityEditor.Graphs.AnimationStateMachine.AnimatorStateTransitionInspector.OnEnable () (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/AnimationStateMachine/AnimatorStateTransitionInspector.cs:55)

Comment
Add comment · Show 4
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 Xelnath · Mar 13, 2015 at 12:28 AM 1
Share

If the game load time didn't dramatically slow down at the same time these errors started, I would agree!

avatar image Velo222 · Mar 16, 2015 at 11:22 PM 0
Share

I have the same problem. It popped up when I started trying to manually play animations in my animator controller via scripting. I have no idea what's causing it.

avatar image WillNode · Mar 17, 2015 at 12:42 AM 0
Share

I have same problem too, it's a rare case, but showing the animator tab looks like solving the problem, and when I relaunch Unity, this error never popping again.

avatar image WillNode · Jun 05, 2015 at 01:36 PM 0
Share

anybody knows the permanent solution for this so far?

9 Replies

· Add your reply
  • Sort: 
avatar image
12

Answer by mezcalito · Apr 05, 2015 at 02:09 PM

it also happened to me when I was adding extra animation states and then I removed them, just followed Wildan suggestion to close Unity and reopen it again and that fixed it for me

Comment
Add comment · Share
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
1

Answer by eweeparker · Jun 10, 2015 at 08:49 AM

Actually I noticed that when changing my "has exit time" checkbox in an animation state, my FindGameObjectWithTag("Player") script references will no longer work. You have to restart it to recompile everything correctly. An interesting situation since everything works fine otherwise. I just wonder if you were altering animation states when this happened.

Comment
Add comment · Share
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
1

Answer by turkiyecng · Aug 25, 2015 at 02:51 PM

I got same error . But i fixed that deleting all meta files in assets folder/subfolder inside. If unity running close unity and after delete (meta files). Its must work .

Comment
Add comment · Share
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
1

Answer by twobob · Sep 29, 2015 at 08:01 PM

It's a bug. Restart Editor

Comment
Add comment · Show 1 · Share
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 ldankarberg · Jul 21, 2020 at 04:46 AM 1
Share

This worked! Thank you!

avatar image
0
Wiki

Answer by Vivek-Savsaiya · Mar 21, 2015 at 06:50 PM

NullReferenceException means the object referenced doesn't exist. It's not exclusive to scripting. If you deleted the actual animation file from your object you'll have to reload the object.

or

in my case I copied a gameobject whose have a animator Controller, for solving I just again assigned a controller in animator(inspector), thats resolve my error. hope this will help you

Comment
Add comment · Share
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
  • 1
  • 2
  • ›

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.

Follow this Question

Answers Answers and Comments

17 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Scale animation with model 1 Answer

Character legs/knees twisting inside in animation 1 Answer

Can you change AnimationClip in controller via scripting? 0 Answers

Gettings Animations in LocalSpace (Parenting Not Working) 0 Answers

if i use capsule collider with one of the bone instead of full character. will there be any problem 0 Answers


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