Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
avatar image
0
Question by jorgon · Oct 04, 2011 at 12:35 PM · objectnullreferenceexceptionreferenceinstance

" NullReferenceException: Object reference not set to an instance of an object"

Please help me. Do you know why I'm receiving this message meanwhile I'm testing my game?.

NullReferenceException: Object reference not set to an instance of an object UnityEditor.ListViewShared.HasMouseDown (UnityEditor.InternalListViewState ilvState, Rect r, Int32 button) (at C:/BuildAgent/work/6bc5f79e0a4296d6/Editor/Mono/GUI/ListViewShared.cs:180) UnityEditor.ListViewShared.HasMouseDown (UnityEditor.InternalListViewState ilvState, Rect r) (at C:/BuildAgent/work/6bc5f79e0a4296d6/Editor/Mono/GUI/ListViewShared.cs:175) UnityEditor.ListViewShared+ListViewElementsEnumerator.MoveNext () (at C:/BuildAgent/work/6bc5f79e0a4296d6/Editor/Mono/GUI/ListViewShared.cs:368) UnityEditor.ConsoleWindow.OnGUI () (at C:/BuildAgent/work/6bc5f79e0a4296d6/Editor/Mono/ConsoleWindow.cs:422) System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)

Thank you very much.

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 syclamoth · Oct 04, 2011 at 12:35 PM 0
Share

You'll have to show us the code at that line- just the error message doesn't tell us any more than your question title does!

3 Replies

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

Answer by Sintua · Oct 12, 2011 at 01:06 AM

This problems doesnt have to do with the project itself, but something with Unity/Visual Studio/Monodevelop.

I have the same issue, after having just started a fresh project and: 1. pressing "sync monodevelop project" since the thing still wont recognize I'm using VS 2. opening the project in the unity project folder so i can get proper references 3. building a simple script 4. fixing the incorrect "line endings" on the script to windows format

I think it has something to do with trying to reference something from monodevelop, for some reason.

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 jorgon · Oct 12, 2011 at 10:18 AM

I solved my issue a week ago. I'm a newbye and sometimes I don't know how to understand those debugging messages.

But thank you anyway. :-)

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 charlesvi · Aug 21, 2012 at 07:54 AM 4
Share

would be great if you bothered to tell others what the solution was...

avatar image
0

Answer by yeoldesnake 1 · Oct 04, 2011 at 02:16 PM

It means that an object is referenced somewhere in the code but the game cant find that gameobject since it returns null which is the indication that it does not exist , which means that you either had a GameObject or Behaviour variable and you did not get to define the object or behaviour you want it to reference in the inspector. Alternatively , GameObject.Find functions return a nullreference exception if you try to access something from a found gameobject , but the game does not actually find it. So if you dont have for example a gameobject named foo , GameObject.Find("foo").bar=3; would return a nullreferenceexception due to the fact that the variable bar does not exist in the inexistent gameobject.

You ought to provide us with the code that produces the error for more specific information though

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

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

The infamous: Object Reference not set to an instance of an object 1 Answer

NullReferenceException: Object reference not set to an instance of an object ? 1 Answer

Object Reference Not Set to an Instance of an object 0 Answers

"Object reference not set to an instance of an object" 2 Answers

Object reference not set to an instance of an 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