- Home /
Way to create/draw a resizable rect/Rect tool through code?
I'm currently working on an editor-side layout tool, and I'm wondering if there's any support for drawing/creating the 4.6 UI Rect Tool in order to make placing/resizing rects easier?
This thing here with the rect and the blue corners:
Answer by Landern · Mar 25, 2015 at 12:44 PM
There isn't a keyturn solution for this. You will need to capture the mouse events and translate it to the space in which the actions took place. After that you will need to create a new RectTransform with the values(Position/Size/etc.) that relate to the RectTransform and all the various properties you need.
Your answer
Follow this Question
Related Questions
How do I set rect pivot? 2 Answers
UI 4.6: custom anchors breaking sizeDelta 0 Answers
Resize a panel in the editor without all its children being stretched? 1 Answer
How do I get the default scene GUI for a CustomEditor for RectTransform? 1 Answer
Can I Reduce The Editor's UI Scale To Below The 100%? 0 Answers