# 测量工具（Measurement Tool）

测量工具为基于`Unity Editor`操作的开发工具。所有的操作均可在`Measurement Tool`面板以及`Scene`中完成。测量工具能够完成以下内容：

* 测量点到点之间的距离，以及垂直分量
* 测量模型的长宽高
* 测量模型之间的距离
* 在测量位置创建锚点

## 测量工具打开

在UMT工具菜单中选择`Utilities`菜单栏，在`Utilities`菜单面板中选择`Measurement`，弹出测量工具的显示面板。界面和菜单栏层级如下图。

![](https://590671407-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcjRYQBrGBRq9cuhWqyze%2Fuploads%2Fgit-blob-1a677ba7ee2b1d4d8317a3dcbf208a4b388abc3a%2Fmeasurement_open.png?alt=media)

## 测量工具使用

### 显示物体长宽高

激活`Measurement Tool`工具之后，点击场景中任意模型，即可绘制出三维模型的具体尺寸（长，宽，高），单位为米。通过对比实际设备的尺寸，可以快速了解到，尺寸是否有变化。并及时更改三维模型。

![](https://590671407-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcjRYQBrGBRq9cuhWqyze%2Fuploads%2Fgit-blob-90bee1070570e666f0fb736df05ff8ecf1cf90e0%2Fmeasurement_showboundingbox.png?alt=media)

### 操作面板与距离测量

#### 面板参数说明

![](https://590671407-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcjRYQBrGBRq9cuhWqyze%2Fuploads%2Fgit-blob-c23b510e24074f23ae78e800e011da1927e45420%2Fmeasurement_panel.png?alt=media)

| 参数名称                                  | 参数说明                                                                                                    |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| Show measurement anchor               | 在`Scene`中生成`Start Point`与`End Point`两个测量点                                                               |
| Specify Measurement Distance          | 是否可在本面板中修改`x point diff`/`y point diff`/`z point diff`三个数值。如果勾选，那么可以通过在界面中修改数值，达到修改距离的效果；如果不勾选，则界面数值为只读 |
| x point diff                          | 显示x轴向的偏移。x轴向为世界坐标系。当`Specify Measurement Distance`勾选时，可以输入修改该值下                                         |
| y point diff                          | 显示y轴向的偏移。y轴向为世界坐标系。当`Specify Measurement Distance`勾选时，可以输入修改该值下                                         |
| z point diff                          | 显示z轴向的偏移。z轴向为世界坐标系。当`Specify Measurement Distance`勾选时，可以输入修改该值下                                         |
| distance diff                         | 显示测量距离                                                                                                  |
| Shade mode                            | 设置场景的渲染方式：渲染、网格、网格渲染，可以在测量时用于排除场景中其他渲染元素的干扰。不同渲染管线可使用的渲染方式有所不同。Built-in能够使用所有渲染方式，HDRP只能使用渲染和网格两种。      |
| Generate anchors and attach to points | 在两个测量点（`Start Point`和`End Point`）对应世界坐标位置，生成两个空Gameobject，方便在该位置放置模型或进行其他操作                             |
| Close                                 | 关闭窗口                                                                                                    |

#### 距离测量步骤

1. 点按`Show measurement anchor`，在`Scene`中生成`Start Point`与`End Point`两个测量点；
2. 将第一步生成的两个测量点分别拖拽到测量的起点和终点；
3. 拖拽完成后，可在场景和窗口面板中看到测量出来的距离与对应三个轴向的坐标差；
4. 若需要在测量点放置模型或者该位置需要保存作为后续使用，可以点按`Generate anchors and attach to points`，分别在`Start Point`和`End Point`位置创建空节点。

![](https://590671407-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcjRYQBrGBRq9cuhWqyze%2Fuploads%2Fgit-blob-36f7e9faf4b2f8d228065d08c1efcd8d64972116%2Fmeasurement_startendpoints.png?alt=media)


---

# Agent Instructions: 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://utc.gitbook.io/umt-manual-book/customize/utilities/measurement.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.
