Horje
unity raycast 2d Code Example
unity 2d raycast mouse
// detect object that was clicked using raycast

RaycastHit2D hit = Physics2D.Raycast(Camera.main.ScreenToWorldPoint(Input.mousePosition), Vector2.zero);
 
if(hit.collider != null)
{
    Debug.Log ("Target name: " + hit.collider.name);
}
unity raycast 2d
Physics2D.Raycast(Vector2 origin, Vector2 direction, float distance = Mathf.Infinity, int layerMask = DefaultRaycastLayers, float minDepth = -Mathf.Infinity, float maxDepth = Mathf.Infinity);




Csharp

Related
convert from xls to xlsx C# Code Example convert from xls to xlsx C# Code Example
c# remove character from string at index Code Example c# remove character from string at index Code Example
c# mathf.ceiling Code Example c# mathf.ceiling Code Example
c list add element Code Example c list add element Code Example
monodevelop ubuntu 20.04 Code Example monodevelop ubuntu 20.04 Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9