Exercise - Create Azure Digital Twin equipped user interfaces
In this unit, you create Azure Digital Twins equipped user interfaces (UIs) to provide a window into operations data.
Add the Operate menu to the main scene
If you have a Bing Maps prefab or any turbine prefabs in your scene, delete them in the Hierarchy panel.
Drag the prefab Assets > Art > Prefabs > Bing Maps Operate into the Hierarchy panel:
- Configure the Maps SDK parameters, including your developer key.
- The Bing Maps Operate prefab has other components that load wind turbines using addressables at runtime. The Addressable Asset System allows you to request an asset by using its address. Once an asset—for example, a prefab—is marked addressable, it generates an address. A Unity application can call the address at runtime. Your application discovers and returns local and remotely stored assets, along with any associated dependencies.
- You can change turbine position by using the Turbine Site Data
ScriptableObject
. To alter the position of any turbine for placement at runtime, change the Latitude or Longitude values in the Wind Turbine Meta Data. Find these configuration parameters for your digital twin turbines under Assets > ScriptableObjects > Turbine Site Data.
Important
Don't change any other parameters or characteristics on addressables. Otherwise, you need to recompile them, which isn't covered in this module.
Drag the UI Panel prefab from Assets > UIPrefabs > Prefabs > OperateSceneUI into the Hierarchy panel.
This UI panel is populated with Turbine Site Data at runtime.
Customize colors for data ranges in UI
Navigate to Assets > ScriptableObjects > Telemetry Range Data in the Project window.
Select one of the four telemetry ranges:
- RangeAmbientTemperature
- RangePower
- RangeRotorSpeed
- RangeWindSpeed
Configure the color ranges on the Health Indicator Gradient.
Position the UI in the main scene
Select the OperateSceneUI game object in the hierarchy.
Position the UI in the scene as you would any other game object. Consider how the user is likely to view the turbine data and where you would expect the UI to be relative to the turbine assets.