From 937daaa2274f1dd7623678a9b6e31354b94fef30 Mon Sep 17 00:00:00 2001 From: Simon Jackson Date: Mon, 19 Jun 2017 18:48:49 +0100 Subject: [PATCH] Manual merge for PR #9 Resolves an issue with the EventSystem and EventTriggers --- Scripts/Primitives/UIPrimitiveBase.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Scripts/Primitives/UIPrimitiveBase.cs b/Scripts/Primitives/UIPrimitiveBase.cs index a8cd6e6..6af851a 100644 --- a/Scripts/Primitives/UIPrimitiveBase.cs +++ b/Scripts/Primitives/UIPrimitiveBase.cs @@ -224,7 +224,7 @@ namespace UnityEngine.UI.Extensions { Rect spriteRect = sprite.rect; //if (type == Type.Simple || type == Type.Filled) - return new Vector2(local.x * spriteRect.width / rect.width, local.y * spriteRect.height / rect.height); + return new Vector2(local.x * rect.width, local.y * rect.height); //Vector4 border = sprite.border; //Vector4 adjustedBorder = GetAdjustedBorders(border / pixelsPerUnit, rect); @@ -280,6 +280,7 @@ namespace UnityEngine.UI.Extensions #region onEnable protected override void OnEnable() { + base.OnEnable(); SetAllDirty(); } #endregion