> For the complete documentation index, see [llms.txt](https://docs.allout.game/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.allout.game/all-out-docs/docs-zh/shi-yong-bian-ji-qi/inspector.md).

# 检查器

检查器面板允许你对场景中的任何实体进行更改，例如调整其大小、层级并添加组件

在检查器顶部，你会看到有关实体的基本属性，例如位置和缩放。

<figure><img src="https://866492016-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzA8RGUKJ88fD0oXVALlz%2Fuploads%2Fgit-blob-660a5ccc906e033b525e2a0873d975202c200906%2Fimage.png?alt=media" alt="Entity transform and components in the inspector"><figcaption></figcaption></figure>

在实体属性下方，是你当前添加到该实体的所有组件。

每个组件都可以提供供你编辑的“字段”。例如，Interactable 组件允许你更改它们的 `文本` 或 `半径` 字段。

你使用脚本制作的自定义组件也可以向检查器公开字段。例如，你可以让一个大亨购买交互组件带有一个字段，用于在编辑器中更改其价格。

```go
Tycoon_Unlock_Button :: class : Interactable {
    @ao_serialize price: s64;
    is_unlocked: bool;

    ao_start :: method() {
        set_listener(this);
        set_text("解锁");
    }

    can_use :: method(player: Player) -> bool {
        return !is_unlocked;
    }

    on_interact :: method(player: Player) {
        if !Economy.can_withdraw_currency(player, "Coins", price) return;

        Economy.withdraw_currency(player, "Coins", price);
        is_unlocked = true;
        set_text("已解锁");
    }
}
```

现在当你添加 `Tycoon_Unlock_Button` 组件到任何实体时，你都可以为该实体设置一个解锁价格。

仅运行时字段，例如 `is_unlocked` 不会显示，除非它们也使用 `@ao_serialize`.
