Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
C#
how to destroy gameobject on trigger collision unity
Ivar de Bruin
Programming language:
C#
2021-03-19 06:20:39
8
Q:
how to destroy gameobject on trigger collision unity
linvenuza
Code:
C#
2021-03-22 00:26:01
function OnTriggerEnter(Collider other) { if (other.gameObject.tag == "ball") Destroy(gameObject); }
0
Tags
unity
object
unit
how
gameobject
game
Related
how to destroy a gameobject after a sertain amount of seconds
in unity i want to destroy a gameobject when it hits the edge of the screen
unity c# on trigger enter with specific gameobject
stop specific coroutine unity
how to destroy a gameobject after some hits in unity 3d
unity clone don't destroy on scene load
how to disable a gameObject unity c#
unity destroy gameobject with delay
dont destroy on load unity
how to play sound on collision unity
New to Communities?
Join the community