Rebuild & Scheduling
ForceRebuild
ForceRebuildpublic void ForceRebuild(bool synchronous = true)
{
if (synchronous) InternalRebuildMeasured();
else StartCoroutine(AsyncRebuild(null));
}Purpose: Rebuild the decal immediately. Can block this frame (synchronous) or run as a coroutine to avoid UI stalls. Parameters:
synchronous–true= block;false= runAsyncRebuild. Returns:voidNotes: Prefer async if you expect large meshes or frequent rebuilds.
AsyncRebuild
AsyncRebuildpublic IEnumerator AsyncRebuild(Action<float> onProgress)
{
yield return null; // allow one frame for UI responsiveness
InternalRebuildMeasured(onProgress);
}Purpose: Coroutine-based rebuild; yields at least once and can report progress [0..1].
Parameters: onProgress (nullable) — receives progress updates; called with 1f at completion.
Returns: IEnumerator (start via StartCoroutine).
Notes: Great for editor tools and runtime UX when you don’t want input hitches.
Last updated