From 54a71dcf057070c72723831680e21e3f2930c214 Mon Sep 17 00:00:00 2001 From: Simon Jackson <sjackson@ethar.com> Date: Thu, 26 Jan 2023 14:21:17 +0000 Subject: [PATCH] Updated NonDrawingGraphic to require a CanvasRender, else it causes an error on run (and doesn't work) - Resolves: https://github.com/Unity-UI-Extensions/com.unity.uiextensions/issues/420 --- Runtime/Scripts/Utilities/NonDrawingGraphic.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Runtime/Scripts/Utilities/NonDrawingGraphic.cs b/Runtime/Scripts/Utilities/NonDrawingGraphic.cs index c3a274b..abd42d8 100644 --- a/Runtime/Scripts/Utilities/NonDrawingGraphic.cs +++ b/Runtime/Scripts/Utilities/NonDrawingGraphic.cs @@ -6,6 +6,7 @@ namespace UnityEngine.UI.Extensions /// A concrete subclass of the Unity UI `Graphic` class that just skips drawing. /// Useful for providing a raycast target without actually drawing anything. [AddComponentMenu("Layout/Extensions/NonDrawingGraphic")] + [RequireComponent(typeof(CanvasRenderer))] public class NonDrawingGraphic : MaskableGraphic { public override void SetMaterialDirty() { return; }