UIExtensions - LineRenderer not updating

Hi,
I’m using the UILineRenderer from the UI extensions asset to plot something.
I’m periodically updating the set of points in the LineRenderer however the line doesn’t seem to change in Play mode even if I see the points changing. If I try to toggle one of the object options the line gets updated so I think there’s a rendering issue here.
Here’s an example of the code:

    using UnityEngine.UI.Extensions;
    using UnityEngine.UI;

    void Start(){
         StartCoroutine("coroutine");
    }

    public class Plot : MonoBehaviour {
         Vector2[] linePoints;
         int pTime;
         IEnumerator coroutine(){
        		Debug.Log("Start service");
        		while(true){
        			pTime = Random.Range(-50,50);
        			updateLine();
        			yield return new WaitForSeconds(1);
        		}
        
        	}
        
        	void updateLine(){
        		Debug.Log("Updating");
        		int i;
        		for(i = 0; i < numPoints-1; i++)
        			linePoints*.y = linePoints[i+1].y;*

_ linePoints*.y = pTime;*_

* lineRenderer.Points = linePoints;*
* }*
}

Solved by calling lineRenderer.SetAllDirty() after updating the points.

I have no fix for you but other things in your code “smell” a bit. Let me unpack those in comments:

public class Plot : MonoBehaviour
{
    Vector2[] linePoints;
    void Start ()
    {
        StartCoroutine( LineRendererRoutine() );//do not use string argument here (slower, bug-prone, redundant)
    }
    IEnumerator LineRendererRoutine ()
    {
        var second = new WaitForSeconds(1);//creating this small object every frame is a kind of memory leak; it will introduce ugly cpu spikes (GC)
        while( true )
        {
            #if DEBUG
            if( linePoints.Length==0 ) { Debug.LogWarning( "linePoints contains nothing" , gameObject ); }
            #endif

            //update line renderer:
            {
                int pTime = Random.Range( -50 , 50 );
                int numPoints = linePoints.Length;
                for( int i = 0 ; i<numPoints-1 ; i++ )
                {
                    //get data from array:
                    Vector3 p0 = linePoints[ i ];
                    Vector3 p1 = linePoints[ i+1 ];

                    //calculate new point
                    Vector3 p0New = p0;
                    p0New.y = p1.y;
                    p0New.y = pTime;//...but you changed 'y' line above already https://i.imgur.com/1vZr6hs.jpg

                    //update data in array:
                    linePoints[ i ] = p0New;
                }
                //PROTIP: skip "{}" brackets when using 'for' loop to introduce silly bugs

                //update line renderer when array when job is done:
                lineRenderer.Points = linePoints;
            }

            //await:
            yield return second;
        }
    }
}