Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 Kokujou · Mar 13, 2013 at 01:37 PM · c#listnullreferenceexceptionproject

My Project doesn't work - Generic.List throws NullReferenceException ?!

First of all you need the Project i uploaded everything in a zip file

(I'm sorry i have to do it this way but it seems i cant upload it to my homepage so i have to use share-online... i hope it's okay) http://www.share-online.biz/dl/SDC8SLJMHBY

As you can see it should be a Memory Game. The Problem is i want to match the 27 Pokemon figures + their duplicates randomly with the 54 Spheres. the Code should work in my eyes but i don't know what Unity makes with that maybe somebody can tell me whats wrong and maybe correct it for me. i'm nearly sure that the error can't be in the code... it has to be somewhere in the project thats why i uploaded the whole thing Please help me i really really need help

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 Landern · Mar 13, 2013 at 02:03 PM 1
Share

This isn't a project, you should export a .unitypackage, having just the asset folder is not helpful, the behavior associations are broke with all the game objects. There is one script/class in the zip file, which one of the three game objects should this be attached to? Camera? Text? etc etc. When i attach to the camera, the script throws a null(not for a list) on line 94.

On side note, your code/script could be much more $$anonymous$$imized and readable, you are doing a lot of work and loops that can be combined together to make it more readable, but that is my opinion and before you state this is a work in progress, you have placed it in a public space for others to help you, having the code hard to read doesn't help you, nor does it help that the behavior linking is busted.

avatar image Kokujou · Mar 13, 2013 at 02:13 PM 0
Share

i'm so sorry i didn't know that

i'm a newbie in unity and my code is just the first try but if it's failing it's useless to shorten it don't you think? i'll upload the .unitypackage in a second and edit my question... the game objects should be the 54 spheres ... ^^ if the unitypackage resolves this it's okay i'm looking after it

please help me again okay? :)

avatar image Kokujou · Mar 13, 2013 at 02:17 PM 0
Share

okay it might be a really stupid question but where can i create the .unitypackage?

avatar image Kokujou · Mar 13, 2013 at 02:20 PM 0
Share

okay i reupload the .zip file with everything i found in my project folder this is all i have :S

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.

Follow this Question

Answers Answers and Comments

11 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

Related Questions

NullReferenceException help 0 Answers

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

C# nullreferenceexception object reference not set 1 Answer

NullReference when accessing GameObject in array (C#) 1 Answer

C# Displaying a List in Series 2 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