Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. The 2023.1 beta is now available for testing. To find out what's new, have a look at our 2023.1 feature highlights.
    Dismiss Notice

Unity LineRenderer problem after upgrading to Unity 5.5

Discussion in '5.5 Beta' started by WinCisky, Sep 22, 2016.

  1. WinCisky

    WinCisky

    Joined:
    Sep 21, 2015
    Posts:
    8
    Hello, after the Unity 5.5 upgrade the Linerenderer component gives me the following problems in loop(keeps generating these 2 errors and obviously don't render the line):
    Assertion failed on expression: 'curveT >= m_Curve[lhs].time && curveT <= m_Curve[rhs].time'
    Assertion failed on expression: 'curveT >= m_Curve[lhs].time && curveT <= m_Curve[rhs].time'​

    There's the lineRenderer code:
    Code (CSharp):
    1. float t = Time.time;
    2. int i = 0;
    3.  
    4. while (i < lengthOfLineRenderer)
    5.         {
    6.             Vector3 pos = new Vector3(i * Mathf.Cos(i + t), i *  Mathf.Sin(i + t) , 0);
    7.             lineRenderer.SetPosition(i, pos);
    8.             i++;
    9.         }
    Can anybody explain me the error?
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,017
    Thats strange. Those assertions look like they come from the animation system. Can you turn on full logging and post the log here?
    upload_2016-9-22_14-29-12.png
     
  3. WinCisky

    WinCisky

    Joined:
    Sep 21, 2015
    Posts:
    8
    Yea it looks like it's an animation problem....
     

    Attached Files:

  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,017
    Can you file a bug with a sample project please. Looks like the color or width curve is throwing the error.
     
  5. WinCisky

    WinCisky

    Joined:
    Sep 21, 2015
    Posts:
    8
    Lol, I got it. I did a stupid error dividing by 0.
    Btw, thank you for your time, you helped me a lot finding the problem!
    P.S. I don't get it because it was working in Unity 5.4 :/
     
    richardkettlewell and karl_jones like this.