Document toolboxDocument toolbox

2023.1.116.1 Unit Manager



Overview

The Unit Manager can be used to globally set the unit of length, angular unit and number of decimals that will be used to display angular and length values in the inspector for Industrial Assets components.

Options for unit of length:

  • Millimeter

  • Centimeter

  • Decimeter

  • Meter - Default

  • Decameter

  • Hectometer

  • Kilometer

Options for angular unit:

  • Degree - Default

  • Radian

  • Revolution (one rotation is 0 to 1)

Number of decimals can be set from 0 to 9 decimals

Filling in a value in an inspector field that uses unit conversion will not change the way that a value is stored in the scene file after serializing the inspected component. Values will always be stored in their default units. Example: filling in a length value of 4 with unit set to centimeters, will store a value of 0.04 in the actual component.

Similar, the a value will not be stored differently based on the amount of decimal numbers set. Example: filling in a value of 1.1234, with the number of decimals set to 2, will store a value of 1.1234, but display a value of 1.12.

Multiple zeros are not considered in displaying the number of variables. With the number of decimals set to 3, an input of ‘4.300’ will nonetheless be displayed as ‘4.3’.


Where to find

The feature can currently only be added as a MonoBehaviour to any GameObject. It is not accesible via the Prespective Menu. Use the ‘Add Component’ button in the inspector panel to find and add the ‘Unit Manager’ component:


Feature Layout

The image below shows the complete feature layout of the Unit Manager.

Field

 

Unit of Length

Drop-down selector for the unit of length (see Overview for options)

Angular Unit

Drop-down selector for the angular unit (see Overview for options)

Number of Decimals

Field to set the number of decimals to display


Prespective Documentation