Skip to main content
added 529 characters in body
Source Link

DMGregory's comment is very useful thanks

If Destroy or SetActive are leading to errors, you have written your code wrong, or made an error in your scene setup. API methods don't throw errors randomly — they obey a specific contract, and if you use them out of contract leading to unwanted behaviour, that's your error, and something you can fix. If you'd like help fixing those root problems, edit your question to document the steps to create a Minimal Complete Verifiable Example of one specific problem you've encountered when trying to use one of these methods

DMGregory's comment is very useful thanks

DMGregory's comment is very useful thanks

If Destroy or SetActive are leading to errors, you have written your code wrong, or made an error in your scene setup. API methods don't throw errors randomly — they obey a specific contract, and if you use them out of contract leading to unwanted behaviour, that's your error, and something you can fix. If you'd like help fixing those root problems, edit your question to document the steps to create a Minimal Complete Verifiable Example of one specific problem you've encountered when trying to use one of these methods

Source Link

DMGregory's comment is very useful thanks