Provides an area (canvas) where draggable UI elements can be added and moved. Requires a Canvas component.
Namespace: Esper.Inventool.UI.UGUI Access: public Type: class Attributes: [RequireComponent(typeof(Canvas))] Inherits: MonoBehaviour
Esper.Inventool.UI.UGUI
public
class
[RequireComponent(typeof(Canvas))]
MonoBehaviour
canvas
Canvas
The canvas component for the drag area.
area
RectTransform
The RectTransform of the drag area.
public static
Instance
ItemDragAreaUGUI
The active instance (singleton).
private
Awake()
void
Initializes singleton, caches canvas and area.
Clear()
Destroys all child game objects inside the drag area.
Add(RectTransform rectTransform)
Parents a RectTransform to the drag area and resets rotation/scale.
Remove(RectTransform rectTransform)
Destroys the provided RectTransform's game object.
Last updated 4 months ago