Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    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:
    8,232
    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:
    8,232
    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.