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 SkillDev · Nov 20, 2012 at 07:29 AM · transformupgradeunity4

Can not destroy Transform component. after upgrade to unity 4

i upgraded my project from unity 3.5 to Unity 4. everything is almost OK. i can run game in editor no error when playing game, but after stopping game it give me some errors about Can't destroy Transform component. ... all references of these errors are to .CPP files like 'GameObjectUtility.cpp Line: 1011'

i checked all of my scripts to see whether i Dispose a Transform but nothing found. all Destroy GameObject.

so i created a simple scene with just a player and no dynamic object. running game is OK but after stopping game : sometime i give no error, sometimes 2 errors, sometimes 3 errors , ...

besides i just running game and do not touch any key on keyboard or mouse to move or fire, but errors keeps happening.

i do not know another way to check scripts for debug.

any idea?

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

2 Replies

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

Answer by SkillDev · Jan 15, 2013 at 05:32 PM

After a few months I fluky found the problem. If you want destroy a game object, make sure that transform.parent is null. if you forget, unity does not inform you at destroy time, but when you stop the game in editor then gives you some errors like i said in question.

It is better for unity to give better information about this type of errors.

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 crazii · Sep 30, 2017 at 02:29 AM

For my case, I got this error when stop playing while instantiated frefab instance kept in reference and not released. I keep reference to manually update & destroy them. they are not released until they end their lifetime.

I tried use GameObject.Destory() in my script ' OnDisable()/OnDestroy() function, to clean the left objects, but nothing changes.

Then DestroyImmediate() is tried and it works.

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

Character not animate after unity 4 upgrade 3 Answers

Convert 3.x Plugins to Unity 4 0 Answers

Unity Free 3.5.4 Project to Unity Free 4.0.1 1 Answer

Upgrading from 4 to 5 0 Answers

Rotating a football with a spiral... 3 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