vertxxyz / Vertx.Debugging

Debugging utilities for Unity
MIT License
508 stars 33 forks source link

Null references #12

Closed Racot007 closed 1 year ago

Racot007 commented 1 year ago

Hi. I found some issues with nullable.

I have this code. Just Capsule Cast.

var result = Physics2D.CapsuleCast(origin, size, CapsuleDirection2D.Vertical, 0, direction, maxDistance, layerMask); D.raw(new Shape.CapsuleCast2D(origin, size, CapsuleDirection2D.Vertical, 0, direction, result, maxDistance, layerMask), Color.blue, DrawPhysicsSettings.Duration);

After that, I has null ref here CastCapsuleHasValueNoTransform

Hit has value but Hit.Transform is null. I has this issue with other casts. In some cases is no errors (mb transform is not null).

Log Screen image

vertxxyz commented 1 year ago

Hi, thanks for the report! I should've fixed this in 2.1.1, which will be propagating to OpenUPM soon (if not already). If the issue persists in any cases I may have missed, please don't hesitate to reopen this issue, thanks!

Racot007 commented 1 year ago

All worked fine. Thanks for the fast fix bro.