Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
11 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 /
  • Help Room /
avatar image
13
Question by ackley14 · Aug 02, 2015 at 11:01 PM · animationnullreferenceexceptionanimation controllerunknown

[Solved]unexplanable null refrence exception

so i was working with animation for the first time today using it to animate part of a (4.5) UI. and at one point (really not sure when) i started getting this nullref error. it doesn't seem to do anything...but its there and it worries me that it could be hurting something in the background. i have no scripts for this animation its 100% done with the editor (animation editor and the animation node editor) heres the stack trace. maybe someone can help me figure out what's causing it so i can put a stop to it

(p.s. : i completely removed the animation controller from the game object and this was still happening so i really don't know right now why this is a thing)

 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:58)
 

Comment
Add comment · Show 3
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 zach-r-d · Aug 02, 2015 at 11:05 PM 1
Share

Did you try restarting Unity?

avatar image Positive7 · Aug 02, 2015 at 11:06 PM 1
Share

Restart Unity

avatar image ackley14 · Aug 02, 2015 at 11:16 PM 0
Share

oh wow.....thanks hahaha now i feel dumb XD

4 Replies

· Add your reply
  • Sort: 
avatar image
43
Best Answer

Answer by ackley14 · Aug 02, 2015 at 11:23 PM

Had to restart unity! thanks to zach.r.d and Positive7 for the tip!!!

Comment
Add comment · Show 8 · 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 KarlKarl2000 · Oct 24, 2017 at 08:02 PM 4
Share

There has to be a better way.. restarting Unity sucks. I have to restart each time I make a tiny change in the animator..

Add a transition --> Animator crashes to spam null refrence exception Turn off Has Exit Time --> Animator crashes to spam null refrence exception Add a Condition --> Animator crashes to spam null refrence exception etc etc :( :( :( :(

avatar image jackhearts · Jan 22, 2018 at 10:32 PM 0
Share

Had the same problem after referencing the animator in code. Thought it was something in the code at first. Bit annoying, going to restart next time!

avatar image AndyUr · Sep 03, 2018 at 05:25 PM 1
Share

Hey I know this is an old thread, but it's still the top result for this issue. Just wanted to note that this is still happening in Unity 2018.2.0f2.

In this version closing and reopening the animator and animation tabs fixes this.

avatar image SimRuJ · Sep 18, 2018 at 02:47 PM 0
Share

I just got this error in 2017.3.1f1 when I hit the "play" button in the "Game" tab (everything was reacting on a big delay afterwards), even though I don't use any animations.

avatar image rajeev-c · Nov 19, 2018 at 07:14 AM 1
Share

I am getting the same issue in Unity 2018.2.14f1

Show more comments
avatar image
4

Answer by lojack84 · Nov 19, 2018 at 11:08 PM

Yeah try restarting Unity. Sonewhat inexplicable null reference voids occur in 4.5. These do not persist after the game is compiled.

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 rodeowild · Sep 06, 2020 at 06:33 PM 0
Share

This does not work, or rather it works for about twenty $$anonymous$$utes. unity version: 2019.2.17.f1

avatar image
1

Answer by Manish_kunwar · Mar 07, 2021 at 08:53 AM

just save your current layout, it should solve your error,

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 BozontGames · Sep 13, 2021 at 06:42 PM 0
Share

Oh my god, I can't believe this solved the problem! I was getting these annoying error messeges as well, but now to think of it, I really forgot the layout to be saved. By the way, I am using 2021.1.15f1 Thanks ^^

avatar image
0

Answer by SuperCool83 · Sep 05, 2017 at 03:12 PM

I found my Animation Play, Pause and Next Frame buttons were Red suggesting the animation was still trying to record key frames. Once I turned these off (by pressing the red play button again - the one that normally enters the play game mode) I was able to continue as before.

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

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

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

Related Questions

Null Reference Exception For An Unknown Reason 0 Answers

My Robot Kyle sticks here, but the animation controller is working. 0 Answers

Grid movement bug. 1 Answer

Why my animations stay on the last frame in the scene before trigging to play? 0 Answers

Actual animation not resetting after deactivating then reactivating object 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