Resources
Answers
Examples
Sign in
Get Started
What do you want to save?
Add Code snippet
New code examples
C#
2022-01-23 09:01:41
how to chceck for a tag in a trigger enter 2d unity
if(target.tag == "Player") { Destroy(this.gameObject); }
Add solution
C#
2021-11-19 10:06:25
how to destroy a gameobject after some hits in unity 3d
Destroy(this.gameObject);
Add solution
C#
2021-11-02 08:03:18
how to destroy in unity
Destroy(this.gameObject);
Add solution
Other
2021-10-29 03:42:18
dontdestroyonload script
GameObject[] objs = GameObject.FindGameObjectsWithTag("music"); if (objs.Length > 1) { Destroy(this.gameObject); } DontDestroyOnLoad(this.gameObject);
Add solution
Best helpers
daily
weekly
monthly
for 3 months
Mike Steinert
+5
Kendra Sarah
+5
Steve n
+5
Maksim Dmitriev
+5
show more
This website uses cookies to make IQCode work for you. By using this site, you agree to our
cookie policy
Welcome Back!
Sign up to unlock all of IQCode features:
Test your skills and track progress
Engage in comprehensive interactive courses
Commit to daily skill-enhancing challenges
Solve practical, real-world issues
Share your insights and learnings
Sign in
E-mail
Password
Recover lost password
Log in
Or log in with
Not registered?
Sign up takes less than a minute
Create a Free Account
Sign up to unlock all of IQCode features:
Test your skills and track progress
Engage in comprehensive interactive courses
Commit to daily skill-enhancing challenges
Solve practical, real-world issues
Share your insights and learnings
Sign up
Email
Password
Sign up for free
Or sign up with
By signing up, you agree to the
Terms and Conditions
and
Privacy Policy
. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.