A draggable window for RectTransforms with bounds checking to keep it within the canvas
1 Overview
3 Methods
4 Usage
6 See also
A draggable window implementation for RectTransforms that includes bounds checking to ensure the window stays within the canvas area.
The properties of the UI Window Base control are as follows:
| Property | Description |
|---|---|
| Keep Window In Canvas | Number of pixels of the window that must stay inside the canvas view |
| Root Transform | The transform that is moved when dragging, can be left empty in which case its own transform is used |
| Property | Return Type | Description |
|---|---|---|
| ResetCoords | bool (static) | Set to true to reset the window to its original position |
This component does not expose public methods beyond inherited behaviour.
Add the UI Window Base component to a RectTransform using:
“Add Component -> UI -> Extensions -> UI Window Base”
Or alternatively, add it via the GameObject menu:
“GameObject -> UI -> Extensions -> Controls -> UI Window Base”
N/A
N/A
GXMark, alexzzzz, CaoMengde777, TroyDavis