Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

unity c# on trigger enter with specific gameobject

void OnTriggerEnter(Collider other)
    {
        if(other.gameObject.name == "Object name") 
			//Object name is the name of the GameObject you want to check for collisions with.
        {
			//What you want to do on trigger enter
        }
    }
Comment

PREVIOUS NEXT
Code Example
Csharp :: raycast shoot unity 
Csharp :: c# open file dialog 
Csharp :: c# loop through datatable 
Csharp :: dotnet get directory of executable 
Csharp :: initialise icollection c# 
Csharp :: c# get all bytes of a file 
Csharp :: unity change sprite source image 
Csharp :: c# datetime current 
Csharp :: onafterrender blazor 
Csharp :: unity pause animator 
Csharp :: unity change play mode color 
Csharp :: unity add explosion force 
Csharp :: move gameobject in unity 2d 
Csharp :: byte array to hex c# 
Csharp :: c# check if element is last in list 
Csharp :: c# main method 
Csharp :: remove a specific line in richtextbox c# 
Csharp :: unity movetowards 2d 
Csharp :: c# debug console log 
Csharp :: c# write to console 
Csharp :: set mouse over colors for button wpf 
Csharp :: ef database first generate models entity framework core 
Csharp :: string to uint c# 
Csharp :: c# write text before user input 
Csharp :: c# read all text from a file 
Csharp :: c# set file invisible 
Csharp :: Arrange array element in right and left order starting from least element 
Csharp :: how to make a object disapear in windows form c# 
Csharp :: c# serviceCollection AddLogging 
Csharp :: fair division 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =