Anchor Reference
Anchor objects to the window's bounds. Read more explanations about it.
Anchor
Anchor objects to the window's bounds.
Behavior properties
- Bottom edge (Choice, one of: "No anchor", "Window top", "Window center", "Window bottom", "Proportional"). Anchor the bottom edge of the object on Y axis. Default value is
No anchor. - Left edge (Choice, one of: "No anchor", "Window left", "Window center", "Window right", "Proportional"). Anchor the left edge of the object on X axis. Default value is
No anchor. - Anchor relatively to original window size (🔘 Boolean). otherwise, objects are anchored according to the window size when the object is created. Default value is
true. - Right edge (Choice, one of: "No anchor", "Window left", "Window center", "Window right", "Proportional"). Anchor the right edge of the object on X axis. Default value is
No anchor. - Top edge (Choice, one of: "No anchor", "Window top", "Window center", "Window bottom", "Proportional"). Anchor the top edge of the object on Y axis. Default value is
No anchor. - Stretch object when anchoring right or bottom edge (deprecated, it's recommended to leave this unchecked and anchor both sides if you want Sprite to stretch instead.) (🔘 Boolean). Default value is
false.
See internal technical details
- Bottom edge is stored as
bottomEdgeAnchor(Choice). Default value isNo anchor. - Left edge is stored as
leftEdgeAnchor(Choice). Default value isNo anchor. - Anchor relatively to original window size is stored as
relativeToOriginalWindowSize(Boolean). Default value istrue. - Right edge is stored as
rightEdgeAnchor(Choice). Default value isNo anchor. - Top edge is stored as
topEdgeAnchor(Choice). Default value isNo anchor. - Stretch object when anchoring right or bottom edge (deprecated, it's recommended to leave this unchecked and anchor both sides if you want Sprite to stretch instead.) is stored as
useLegacyBottomAndRightAnchors(Boolean). Default value isfalse.
No expressions for this behavior.
The Anchor extension is always installed in all GDevelop projects: there is no need to add it from the Project Manager.
This page is an auto-generated reference page about the Anchor feature of GDevelop, the open-source, AI-powered, cross-platform game engine designed for everyone. Learn more about all GDevelop features here.