> For the complete documentation index, see [llms.txt](https://worldboxopenmods.gitbook.io/mod-tutorial-en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://worldboxopenmods.gitbook.io/mod-tutorial-en/user-interface/autolayoutwindow.md).

# Autolayout Window

由于你游模组作者UI都写得不太行, 反观BepInEx的菜单能够自动布局, 因此特别推出这个自动布局窗口, 你只需要简单地开启(垂直/水平/网格)分组, 然后加入设定大小的组件即可自动布局.

如下图所示 ![1703844770998](https://github.com/inmny/Documentation-en/blob/master/.gitbook/assets/1703844770998.png)

[相关示例代码](https://github.com/WorldBoxOpenMods/ModExample/blob/master/ui/windows/ExampleAutoLayoutWindow.cs)

[相关预制体](https://github.com/WorldBoxOpenMods/ModExample/blob/master/ui/prefabs/SimpleText.cs)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://worldboxopenmods.gitbook.io/mod-tutorial-en/user-interface/autolayoutwindow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
