Wiki
Clone wikiUnity-UI-Extensions / Controls / NonDrawingGraphic
Non-Drawing Graphic
==============
A graphic component with zero draw calls, useful (when paired with a click script or the Selectable Extension) for invisible buttons or hit test blockers.
Contents
1 Overview
3 Usage
5 See also
Overview
The Non Drawing Graphic component allows you to add a graphic hit testable area with zero draw calls. The Raycast hit test can also be enabled or disabled (instead of using a CanvasGroup)
It is also very useful when paired with the Selectable Extension to add Click, Release and Hold capabilities.
Properties
The properties of the Non Drawing Graphic component are as follows:
Property | Description |
---|---|
Raycast Target | Should this GO block raycasts or not. Changeable in code or editor. |
Usage
Simply add the default Non Drawing Graphic component to a RectTransform using "UI / Extensions / Non Drawing Graphic" in the Editor "Component" menu.
It is also available as a Game Component menu in "UI / Extensions / Non Drawing Graphic".
There is also a "Clickable" version, which includes the additional components to make the NonDrawing Graphic support events when clicked.
*Note, in Source there are also two Editor menu's to add an Empty GO with the component attached and on to add the Non Drawing Graphic with the additional Selectable Extension. These will be added to the asset in the next update.
Video Demo
Click to play
See also
- Selectable Extension (to add the extended click behaviour to this component)
Credits and Donation
Credit Slipp Douglas Thompson / capnslipp Submitted by PixelEnvision
External links
Sourced from - https://gist.github.com/capnslipp/349c18283f2fea316369/
Updated