⚠ Preview docs — built from the develop branch and may be unstable. Go to the stable docs.

UI.ButtonAt

static bool ButtonAt(string text, Vec3 topLeftCorner, Vec2 size, Align textAlign)

A variant of UI.Button that doesn’t use the layout system, and instead goes exactly where you put it.

   
string text Text to display on the button and id for tracking element state. MUST be unique within current hierarchy.
Vec3 topLeftCorner This is the top left corner of the UI element relative to the current Hierarchy.
Vec2 size The layout size for this element in Hierarchy space.
Align textAlign Where the text aligns within its allotted box. Align.None falls back to the element’s natural alignment, which is generally what you want.
RETURNS: bool Will return true only on the first frame it is pressed!




Found an issue with these docs, or have some additional questions? Create an Issue on Github!