diff --git a/OutlineEffect/OutlineEffect.cs b/OutlineEffect/OutlineEffect.cs index eb9d2fa..aa6ae2b 100644 --- a/OutlineEffect/OutlineEffect.cs +++ b/OutlineEffect/OutlineEffect.cs @@ -454,6 +454,18 @@ void UpdateOutlineCameraFromSource() #endif } + //Use when performing dynamic processing + public void AddOutline(GameObject go) + { + var outline = go.AddComponent(); + bool isRendererEnabled = outline.Renderer.enabled; + if (isRendererEnabled) + { + outline.Renderer.enabled = false; + outline.Renderer.enabled = true; + } + } + public void AddOutline(Outline outline) => outlines.Add(outline);