Skip to content

Code Inspections for Physics2D.LinecastAll will not work, and corresponding method may be not correct. #1324

@RyotaMurohoshi

Description

@RyotaMurohoshi

According to Avoid using allocating versions of Physics Raycast functions, there are some code inspections for Physics and Physics2D.
For example, the code inspections suggests converting from Physics2D.BoxCastAll to Physics2D.BoxCastNonAlloc.

According to Avoid using allocating versions of Physics Raycast functions, there is a code inspections from Physics2D.LinecastAl to Physics2D.CapsuleCastNonAlloc
But this code inspections will not work.

And, at https://docs.unity3d.com/ScriptReference/Physics2D.LinecastAll.html , Physics2D.LinecastAll corresponds to Physics2D.LinecastNonAlloc not Physics2D.CapsuleCastNonAlloc.

At the code

, LinecastAll is corresponding to CapsuleCastNonAlloc
I expect this method mapping may be wrong.
This mismatch may be cause of Physics2D.LinecastAll will not work. There is arguments check in code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions