Hi there,
Thanks for ALINE, it’s great.
I am trying to use RedrawScopes but I am not able to work out the syntax.
I have some data that is only calculated on some frames. I want to remember what was drawn so that I can draw it on all of the frames until its recalculation time.
Here is one of the attempts I made:
public class Ovrewire : MonoBehaviour
{
private RedrawScope _redrawScope;
private bool _firstTime = true;
void Update()
{
if (_firstTime)
{
_redrawScope = new RedrawScope();
var builder = DrawingManager.GetBuilder(renderInGame: true, redrawScope: _redrawScope);
builder.Line(new float3(0, 80, 400), new float3(100, 130, 400), Color.magenta);
builder.Dispose();
_firstTime = false;
}
else
{
_redrawScope.Draw();
}
}
}
It doesnt draw the line except for the first frame.