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 BluePinguin · Jul 26, 2014 at 09:33 PM · prefabsdestroyed

Scripts of Objects which I've deleted through the editor still exist and are run

I created an environment. Not too big but not too small. I created a new scene but needed the same environment. So I created a prefab and implemented it in a new scene. I detached the prefab, because I wanted to build further on the environment in this scene.

Strange stuff started to happen. The editor told me "the referenced script on this Behaviour is missing!" 3 times, all on the same object. If I click on it there is no script missing, plus there is a selection animation from Unity, which looks like is working on a misplaced line. See the next picture.

It seems the selection animation of Unity goes wrong

But I ignored it, since my game was still running fine. Just about an hour ago I noticed all my prefab bindings in the environment were gone as well. So I tried to rebind the environment. Then Unity placed an entire new instance of the environment in the scene. I was surprised. I deleted it again, and noticed more strange stuff happening.

Somewhere in the code I start an AudioSource. Before this last event it worked normal. Now it still works normal but also throws a new warning:

Can not play a disabled audio source

But, there is no disabled audio source. There is only a single audio source in the entire scene, and it's enabled!

On top of that, it works, everything goes as normal, the audio plays. So I placed a Debug.Log on the line before it to see if it get's called multiple times, and it printed 3 times! I then Cut/Pasted the Debug line into the contructor, and also there it got called 3 times!

Then my Unity started really freaking out. It threw and enourmous pile of errors including saying me wanting to start an audio source which was already destroyed. Remember: I changed nothing in the code except for the Debug lines.

I decided to reboot my Unity, and now I am back at the AudioSource warning.

Does anyone know what the f is happening? I can't have this: Unity messing up my work. Stuff in the environment isn't responding anymore and I can't find out what is causing this. Does anyone have any clue what is happening?

Thanks in advance.

Comment
Add comment
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

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

2 People are following this question.

avatar image avatar image

Related Questions

Making a cloned particle emitter fire once only 2 Answers

Can prefabs drop attached scripts? 0 Answers

big script vs many scripts 1 Answer

Prefabs wont disapear 5 Answers

Do scripts get cloned with prefabs? 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