• 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

Ondestroy

Cancel

Cancel

All Questions

  • Unanswered Questions
avatar image

Croolsby answered

Detect when a component has been removed.

Jan 7, '16 assetdatabase·ondestroy

1 Reply

2 Votes

avatar image

$$anonymous$$ commented

Game Over GUI

Aug 28, '14 gui·player·components·ondestroy

2 Replies

0 Votes

avatar image

Ryujose commented

Instantiate, problem on transform position

Dec 31, '14 instantiate·transform.position·ondestroy

1 Reply

0 Votes

avatar image

vikingfabian-com answered

OnDestroy in Editor - memory loss issue

Jun 24, '14 executeineditmode·ondestroy

1 Reply

0 Votes

avatar image

AchillesWF published

Object startup sequence skipped when returning from play mode to editor???

Feb 25, '12 editor·start·not·ondestroy

0 Replies

0 Votes

avatar image

SisterKy edited

switch weapon onDestroy

Jul 15, '11 switch·ondestroy·switch objects

1 Reply

-1 Votes

avatar image

blitzen asked

GameObjects Created Twice from Application.LoadLevel?

Feb 18, '14 start·awake·application.loadlevel·ondestroy

0 Replies

0 Votes

avatar image

stephen_gregory commented

MonoBehaviour.OnDestroy() how it works/ how to use it? Closed

Nov 26, '20 singleton·generics·ondestroy

1 Reply

0 Votes

avatar image

GalZohar edited

How can viewID not be found if object exists?

Jan 7, '13 networkview·ondestroy·viewid

0 Replies

0 Votes

avatar image

antiping_Unity published

Activity lifecycle with MonoBehaviour method?

Feb 5, '14 ondestroy

0 Replies

0 Votes

avatar image

iwaldrop commented

OnDestroy() object with tag

Jun 8, '14 prefab·tag·ondestroy

1 Reply

0 Votes

avatar image

hadowmaru commented

StateMachineBehaviour.OnDestroy is getting called by SetActive

Jun 15, '20 animator·animator controller·state machine·ondestroy

1 Reply

1 Votes

avatar image

Kiwasi commented

GUI buttons not appearing on Destroy

May 26, '14 c#·gui·interface·ondestroy·execute

1 Reply

0 Votes

avatar image

dargonknight edited

How to start animation after object is destroyed ?

Mar 18, '19 animation·gameobject·2d game·destroy·ondestroy

1 Reply

0 Votes

avatar image

Remycxh published

When I Multi-select gameobjects and press 'delete' 'OnDestroy' func is not called?

Sep 2, '14 editor·callback·ondestroy

0 Replies

0 Votes

avatar image

yoan-kyun asked

Cancel OnDestroy when changing scene

Feb 24, '19 in Help Room

0 Replies

2 Votes

avatar image

blackmask86 asked

I cant delete multiple instantiated prefabs

Jun 27, '20 gameobject·instantiate·prefab·delete·ondestroy

0 Replies

0 Votes

avatar image

Aridez answered

Recording destroyed object inside OnDestroy() method

Nov 12, '18 undo·executeineditmode·ondestroy

1 Reply

0 Votes

avatar image

YetAnotherKen commented

How to destroy Scriptable Objects on Reimport

Sep 10, '19 scriptableobject·importing assets·native plugin·ondestroy

1 Reply

1 Votes

avatar image

highpockets edited

How to start animation after dialogue ends a.k.a currentLine == 3

Mar 18, '19 animation·boolean·bool·dialogue·ondestroy

1 Reply

0 Votes

avatar image

meat5000 edited

audioSource.time in "OnDestroy"

Feb 5, '18 audio·audiosource·ondestroy

1 Reply

0 Votes

avatar image

rh_galaxy answered

OnDestroy() called when ending application. Any alternatives?

Oct 30, '21 c#·scene·destroy·ondestroy

1 Reply

0 Votes

avatar image

Dubgron commented

Unexpected duplication of scene

Jan 3, '16 in Help Room

1 Reply

0 Votes

avatar image

Treven commented

transform.DetachChildren() is deactivating my children's scripts after detaching from the parent

Apr 10, '20 children·ondestroy·transform.parent·disabling·detach

1 Reply

0 Votes

avatar image

GPallas published

How to receive a message that Unity is closing on a docked EditorWindow

Jan 5, '17 editorwindow·ondestroy

0 Replies

0 Votes

avatar image

aad7615 commented

Need help reassigning variables after the deletion of an object has been undone.

Jan 21, '20 editor·variables·delete·undo·ondestroy

0 Replies

0 Votes

avatar image

Trevdevs commented

GUI not showing up on player destroy

Jun 29, '18 gui·player·ondestroy

1 Reply

0 Votes

avatar image

Goubermouche asked

saving prefabs in the onDestroy method

Aug 29, '20 prefabs·saving·data storage·folders·ondestroy

0 Replies

0 Votes

avatar image

zak666 asked

Objects still in scene on loadscene? (creating objects on destroy?)

Nov 10, '18 scene·reload·ondestroy

0 Replies

0 Votes

avatar image

ChichoRD asked

Does OnDisable()/OnStart() get always called OnApplicationClose?

Jan 22, '21 c#·playerprefs·ondestroy·ondisable·onapplicationquit

0 Replies

0 Votes

  • ‹
  • 1
  • 2

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.

Related Topics

destroy gameobject editor c# ondisable instantiate scene delete saving callback gui error event player onapplicationquit time start scriptableobject singleton prefab execution order animation monobehaviour load editorwindow


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