Search Unity

Resolved [Bug] After conversion from 2020 to 2021, LineRenderer points get filled with infinity

Discussion in 'Editor & General Support' started by Gordon_G, Jan 10, 2022.

  1. Gordon_G

    Gordon_G

    Joined:
    Jun 4, 2013
    Posts:
    372
    Hi, I'm testing out Unity 2021 to see what kind of problems we'd run into on a project that works fine in 2020.3.11f1.

    Well, right off the bat I have a script that uses a LineRenderer to draw a curved corners and fails by generating LineRender points that are filled with Infinity values.

    When I watch the lineRender values in the 2020 version, and the values are no where near very small or very large - they are all in the 4.0 to 0.5 range. Is there some issue with floating point numbers that changed in 2021?

    As this script works in 2020, Is there bug with Unity 2021 and LineRenders or what? Or how could I fix this?

    [Edited] And get this: when I run the Visual Studio debugger to try to find where the problem is, it works perfectly....??? When I run it without the debugger, it fails again!
     
    Last edited: Jan 11, 2022
  2. Gordon_G

    Gordon_G

    Joined:
    Jun 4, 2013
    Posts:
    372
    OK, Here is the fix: it turns out (I guess) the problem appeared because I am running on an M1 Mac under Rosetta. Who knows?

    When I upgraded the Unity Editor to the Apple Silicon version, it started working again without error.