diff --git a/OutlineEffect/OutlineEffect.cs b/OutlineEffect/OutlineEffect.cs index eb9d2fa..6b37df3 100644 --- a/OutlineEffect/OutlineEffect.cs +++ b/OutlineEffect/OutlineEffect.cs @@ -454,6 +454,18 @@ void UpdateOutlineCameraFromSource() #endif } + public void ClearAllOutlines() + { + foreach (var outline in outlines.ToList()) + { + if (outline != null) + { + Destroy(outline.gameObject.GetComponent()); + } + } + outlines.Clear(); + } + public void AddOutline(Outline outline) => outlines.Add(outline);