This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
raycasthit2d [2021/05/05 06:57] andrew900460 created |
raycasthit2d [2021/05/05 16:53] uninomiconadmin |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | '' | + | ====== |
- | Example: | + | ==== Casts Implicitly To a Bool ==== |
- | < | + | |
+ | RaycastHit2D implements the C# [[https:// | ||
+ | |||
+ | ++++ Example: | ||
+ | < | ||
RaycastHit2D hit = Physics2D.Raycast(someStartPoint, | RaycastHit2D hit = Physics2D.Raycast(someStartPoint, | ||
Line 9: | Line 13: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | This is also valid: | ||
+ | <code c#> | ||
+ | RaycastHit2D hit = Physics2D.Raycast(someStartPoint, | ||
+ | |||
+ | bool rayHitSomthing = hit; | ||
+ | </ | ||
+ | ++++ |