Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

on collision enter by layer 2d unity

     void OnCollisionEnter(Collision collision)
     {
         if (collision.gameObject.layer == 8/*the layer number*/ )
             debug.log(collision.gameObject.layer.number.ToString() "touched")
	}
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# object list attribute to string 
Csharp :: c# sort for loop 
Csharp :: unity 2d 
Csharp :: c# add button to messagebox 
Csharp :: asp.net mvc image upload 
Csharp :: c# file read 
Csharp :: unity class 
Csharp :: c# tell if list object is empty 
Csharp :: how to convert object in string JSON c# 
Csharp :: textblock line break 
Csharp :: c# get property type of list 
Csharp :: datetime month name 
Csharp :: how get data from json in c# 
Csharp :: C# setting property values through reflection with attributes 
Csharp :: c# constructor call another constructor 
Csharp :: rotate gameobject unity 
Csharp :: how to upload an image to an image source c# 
Csharp :: c# how to crete array 
Csharp :: c# code skripte kommunizieren 
Csharp :: string tochararray c# 
Csharp :: change sprite color unity 
Csharp :: interpolate rotation unity3d 
Csharp :: yield in c# 
Csharp :: which game engine is best 
Csharp :: how to generate a random number in c# 
Csharp :: unity get prefabs from folder 
Csharp :: c# move form without border 
Csharp :: c# goto statement 
Csharp :: unity detect when an object has been clicked 
Csharp :: c# get a value from value tuple list 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =