Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

how to check the tag of a collider in unity

void OnTriggerEnter(Collider collision)
{
	if(collision.gameObject.tag == "[Tag]")
    {
 		//Do Something...
	}
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: draw sphere gizmo unity 
Csharp :: c# random number 
Csharp :: check dotnet version command line 
Csharp :: unity button onclick remove listener 
Csharp :: how to delete all files in a directory c# 
Csharp :: bitmasking in c# 
Csharp :: How to read SQL Server COUNT from SqlDataReader 
Csharp :: create or update in laaravel 
Csharp :: fade text unity 
Csharp :: how to reload current scene unity 
Csharp :: get self component in unity 
Csharp :: unity set object scale 
Csharp :: c# unix timestamp 
Csharp :: how to disable a gameObject unity c# 
Csharp :: c# check if string is empty 
Csharp :: unity distance between 2 vectors 2d 
Csharp :: unity wait for seconds 
Csharp :: string to int c# 
Csharp :: c# base64 decode 
Csharp :: how to change particle system rate over time unity 
Csharp :: random value in array c# 
Csharp :: how to change scenes with button press in unity c# 
Csharp :: swagger authentication bearer .net core 
Csharp :: remap float c# 
Csharp :: unity array to list 
Csharp :: backcolor c# hexadecimal 
Csharp :: ef database first generate models entity framework core 
Csharp :: how to make a dragable object in unity2D 
Csharp :: .net loop through dictionary 
Csharp :: maxheap c# 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =