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 /
  • Help Room /
avatar image
0
Question by Gregums · Nov 02, 2015 at 03:36 PM · gameobjectinspectorscript errorhierarchy

Script does not recognise gameObjects

Greetings & thanks for your time.

I have looked over the forums, but not seen/recognised another problem quite like mine; the issue I am having is that I have a number of public script functions, which I am connecting to UI elements and gameObjects in a relatively simple scene - this was working well enough as I was building the game, but now when I load the scene, I find that there are no objects linked to any of the scripts; when I try to re-establish the links the selector cannot identify the objects in the scene.

I had a similar problem before on an earlier project, which I solved by copy&pasting the scripts to new script objects and deleting the old ones, though since I am having the same problem again I would like to understand what is wrong and if there is a more convenient solution - especially if I end up working on larger projects where it would not be practical to redesign a scene from scratch.

Comment
Add comment · Show 2
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 Gregums · Oct 31, 2015 at 06:42 PM 0
Share

PS: This issue occurs on the script prefab - when the scipts are attached to an object there is no problem. However, I want to be able to have the script prefabs callibrated so I can drop them on any object so that they are ready to go, without callibrating them every single time.

avatar image meat5000 ♦ · Nov 01, 2015 at 10:23 PM 0
Share

You must save the Scene from the Gameobjects to remember their stuffs and save Project so Prefabs etc remember theirs.

1 Reply

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

Answer by OncaLupe · Nov 02, 2015 at 05:26 PM

You mention is a comment that it's an issue when saving an object as a prefab, and that's the reason right there. Prefabs are just sitting in the assets and can be brought in at any time in any scene. They cannot hold references to objects in a live scene since there's no guarantee that those objects will be there when the prefab is used.

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 Gregums · Nov 02, 2015 at 11:16 PM 0
Share

Ok, thanks - at least I know that there is no error.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Is there a way to refer to the only script the object has without naming the script? 2 Answers

Breaking Object by Destroying it and Instantiating Broken Parts problem, help! 2 Answers

Novice Question: Assigning GameObject properties efficiently. 1 Answer

Checking a gameObject active in hierarchy not working. 1 Answer

Game Object disappear after move to another Scene 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