• 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 carlqwe · Oct 04, 2016 at 08:26 AM · gameobject

UnassignedReferenceException: The variable StartPanelBROO of StartPanel has not been assigned.

Help... alt text

alt text

part2.png (39.6 kB)
part1.png (65.1 kB)
Comment
Add comment · Show 5
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 Bonfire-Boy · Oct 04, 2016 at 07:09 PM 0
Share

Are you sure that the StartPanel component you are showing us in the screenshot is the only one in the scene?

avatar image carlqwe Bonfire-Boy · Oct 05, 2016 at 10:03 AM 0
Share

To everyone: Ive looked throught all my gameobjects and there is only one script called "StartPanel" and also only one StartPanelBroo. And there is nothing weird in the code, it was working perfectly and all of the sudden everything just broke. I've updated Unity and restarted the computer and unity. Still no luck, ive even deleted the whole script component and tried but still this error. Help :s

avatar image carlqwe · Oct 05, 2016 at 10:03 AM 0
Share

To everyone: Ive looked throught all my gameobjects and there is only one script called "StartPanel" and also only one StartPanelBroo. And there is nothing weird in the code, it was working perfectly and all of the sudden everything just broke. I've updated Unity and restarted the computer and unity. Still no luck, ive even deleted the whole script component and tried but still this error. Help :s

avatar image Bonfire-Boy carlqwe · Oct 05, 2016 at 11:04 AM 0
Share

That wasn't an answer to the question, so I have converted it to a comment.

I'm not sure how to make sense of your last sentence. If you have deleted the component, and it was the only one, then you now have no instances of the component and shouldn't be getting any errors related to the script.

Looking through your gameobjects is not the right way to make sure you don't have other instances. Try putting a Debug.Log in its Awake() & Start() functions ins$$anonymous$$d.

If you're worried that something is corrupted, restarting Unity probably won't help. You might want to try deleting your Library folder (while Unity is closed) so that Unity is forced to rebuild it. Personally I think it's more likely that it's something you're doing.

Another question: Is this a scene object? (is it there in the scene when the game's not running). Do you have any prefabs with this component in them?

avatar image ScaniX · Oct 05, 2016 at 11:48 AM 0
Share

Please post the code that is producing the error. It might be in a method that gets called before the inspector values have been assigned, like the constructor.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by denisb · Oct 04, 2016 at 06:50 PM

maybe you are just losing your reference to your gameobject. by having something like StartPanelBROO = null;

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 carlqwe · Oct 05, 2016 at 09:59 AM 0
Share

there is no such line in my code

avatar image
0

Answer by dval · Oct 04, 2016 at 06:19 PM

It looks like you have 'Start Panel' pointing to itself. Not sure of your setup but this could be causing some logic issues :

StartPanelBroo = StartPanel has StartPanelBroo = StartPanel has StartPanelBr..... and so on.

or depending on the script, it could be looking for a GameObject in the Scene, and possibly you assigned a prefab from the Project, so it's no where to be found in the scene.

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 carlqwe · Oct 05, 2016 at 10:03 AM 0
Share

To everyone: Ive looked throught all my gameobjects and there is only one script called "StartPanel" and also only one StartPanelBroo. And there is nothing weird in the code, it was working perfectly and all of the sudden everything just broke. I've updated Unity and restarted the computer and unity. Still no luck, ive even deleted the whole script component and tried but still this error. Help :s

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

74 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 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

using Contains(gameObject) to find and destroy a gameObject from a list 2 Answers

GameObjects creation within boundry 3 Answers

Enable and object after disable 0 Answers

Script to Keep One GameObject from Being Destroyed 0 Answers

Problem with timed code-execution (audioplay and object destruction) 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