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
pull/413/head
Simon Jackson 2023-01-26 14:21:17 +00:00
parent 07ec98c989
commit 54a71dcf05
1 changed files with 1 additions and 0 deletions

View File

@ -6,6 +6,7 @@ namespace UnityEngine.UI.Extensions
/// A concrete subclass of the Unity UI `Graphic` class that just skips drawing. /// A concrete subclass of the Unity UI `Graphic` class that just skips drawing.
/// Useful for providing a raycast target without actually drawing anything. /// Useful for providing a raycast target without actually drawing anything.
[AddComponentMenu("Layout/Extensions/NonDrawingGraphic")] [AddComponentMenu("Layout/Extensions/NonDrawingGraphic")]
[RequireComponent(typeof(CanvasRenderer))]
public class NonDrawingGraphic : MaskableGraphic public class NonDrawingGraphic : MaskableGraphic
{ {
public override void SetMaterialDirty() { return; } public override void SetMaterialDirty() { return; }