• 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

Giobar97 commented

How to spawn a second Game Object at the same location of a first game object after the first game object is destroyed, please read the description to completely understand the question

6 days ago instantiate·unity 2d·ontriggerenter2d·ondestroy

2 Replies

0 Votes

avatar image

IyroHaYuu edited

OnEnable/Disable on property drawers

Aug 31, '22 editor·propertydrawer·ondestroy·onenable

4 Replies

1 Votes

avatar image

ruudvangaal commented

OnDestroy called when object lost focus in editor

May 17, '22 editor·ondestroy·ondisable

2 Replies

0 Votes

avatar image

DavidRoad answered

UI 4.6 canvas button, how to make it invisible on gameplay and how to make it visible when player is dead?

Feb 19, '22 ui·button·player·canvas·ondestroy

3 Replies

0 Votes

avatar image

ramsey05 commented

Is there a way to disable Maximize on an EditorWindow?

Nov 30, '21 editorwindow·ondestroy

1 Reply

2 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

ChichoRD asked

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

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

0 Replies

0 Votes

avatar image

glenneroo edited

Some objects were not cleaned up when closing the scene

Dec 30, '20 error·error message·spawning problems·ondestroy

2 Replies

0 Votes

avatar image

sl1nk3_ubi edited

Detect when GameObject has been deleted / removed from scene

Dec 16, '20 editor·destroy·delete·ondestroy·ondisable

10 Replies

8 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

Goubermouche asked

saving prefabs in the onDestroy method

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

0 Replies

0 Votes

avatar image

Iq110 edited

OnDestroy() callback in Editor upon deleting selected GameObject - del key Wiki

Aug 22, '20 gameobject·editor·delete·callback·ondestroy

5 Replies

4 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

hadowmaru commented

StateMachineBehaviour.OnDestroy is getting called by SetActive

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

1 Reply

1 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

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

YetAnotherKen commented

How to destroy Scriptable Objects on Reimport

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

1 Reply

1 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

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

yoan-kyun asked

Cancel OnDestroy when changing scene

Feb 24, '19 in Help Room

0 Replies

2 Votes

avatar image

pz_cloud edited

Why does onDestroy in UnityPlayerActivity kill the entire process (Android)

Feb 15, '19 android·kill·activity·ondestroy

4 Replies

1 Votes

avatar image

Aridez answered

Recording destroyed object inside OnDestroy() method

Nov 12, '18 undo·executeineditmode·ondestroy

1 Reply

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

Trevdevs commented

GUI not showing up on player destroy

Jun 29, '18 gui·player·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

FlaSh-G answered

OnDisable and OnDestroy Not Get Called - iOS

Nov 10, '17 scripting problem·monobehaviour·ondestroy·ondisable

2 Replies

0 Votes

avatar image

playsidepaul answered

Isolate OnDisable from OnDestroy

Apr 4, '17 ondestroy·ondisable

2 Replies

0 Votes

avatar image

Derptastic commented

Instantiate OnDestroy

Mar 31, '17 javascript·instantiate·ondestroy

1 Reply

7 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

eventropy commented

OnDisable/OnDestroy Execution Order

Apr 15, '16 execution order·ordering·ondestroy·ondisable

2 Replies

3 Votes

  • 1
  • 2
  • 3
  • ›

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 delete scene event player saving callback gui error monobehaviour load editorwindow executeineditmode ontriggerenter2d undo onapplicationquit time start scriptableobject singleton


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