diff --git a/Editor/BezierLineRendererEditor.cs b/Editor/BezierLineRendererEditor.cs
index 1a25109..5184ac1 100644
--- a/Editor/BezierLineRendererEditor.cs
+++ b/Editor/BezierLineRendererEditor.cs
@@ -12,7 +12,7 @@ namespace UnityEngine.UI.Extensions
{
UILineRenderer curveRenderer = target as UILineRenderer;
- if (!curveRenderer || curveRenderer.Points == null || curveRenderer.Points.Length < 2)
+ if (!curveRenderer || curveRenderer.drivenExternally || curveRenderer.Points == null || curveRenderer.Points.Length < 2)
{
return;
}
diff --git a/Scripts/Primitives/UILineRenderer.cs b/Scripts/Primitives/UILineRenderer.cs
index d0860f0..001a2ca 100644
--- a/Scripts/Primitives/UILineRenderer.cs
+++ b/Scripts/Primitives/UILineRenderer.cs
@@ -64,6 +64,9 @@ namespace UnityEngine.UI.Extensions
public BezierType BezierMode = BezierType.None;
public int BezierSegmentsPerCurve = 10;
+ [HideInInspector]
+ public bool drivenExternally = false;
+
///
/// UV rectangle used by the texture.
///
diff --git a/Scripts/Utilities/UIExtensionMethods.cs b/Scripts/Utilities/UIExtensionMethods.cs
new file mode 100644
index 0000000..bb49049
--- /dev/null
+++ b/Scripts/Utilities/UIExtensionMethods.cs
@@ -0,0 +1,26 @@
+/// Credit Simon (darkside) Jackson
+/// Sourced from - My head
+namespace UnityEngine.UI.Extensions
+{
+ public static class UIExtensionMethods
+ {
+ public static Canvas GetParentCanvas(this RectTransform rt)
+ {
+ RectTransform parent = rt;
+ Canvas parentCanvas = rt.GetComponent