Struct RedrawScope Extends IDisposable

Public

Used to cache drawing data over multiple frames.

This is useful as a performance optimization when you are drawing the same thing over multiple consecutive frames.

private RedrawScope redrawScope;

void Start () {
redrawScope = DrawingManager.GetRedrawScope();
using (var builder = DrawingManager.GetBuilder(redrawScope)) {
builder.WireSphere(Vector3.zero, 1.0f, Color.red);
}
}

void OnDestroy () {
redrawScope.Dispose();
}

Public Methods

Dispose ()

Dispose the redraw scope to stop rendering the items.

Rewind ()

Stops keeping all previously rendered items alive, and starts a new scope.

Public Variables

isValid

True if the scope has been created.

Public

Public Static Variables

idCounter
Public Static

Private/Protected Members

Draw ()

Everything rendered with this scope and which is not older than one frame is drawn again.

DrawUntilDispose (associatedGameObject)
RedrawScope (gizmos, [id])
gizmos
Internal
id

ID of the scope.

Internal