- Create a new template, and call it Tank2.
- Right-click on the background of the template, and select Customizers > Custom Property.
- Add a Template Parameter called tankUDT, but this time, we want the type to be a UDT (named "Tank_UDT") that we have already created.
- Next, add some components to our template: Label, Cylindrical Tank, and Slider. Be sure to utilize the Template Parameter tankUDT.
Add a Label component at the top of the template to show the name of the tank. Using a property binding, bind the label to the Tag Name property of the UDT property tankUDT in the Meta folder. This will pull the name of the UDT instance in as the title of the template. Don't worry if it makes your label blank, as there is nothing in that custom property yet.
- Add a Slider component and bind it to the sliderValue property within the tankUDT property.
- Add a Cylindrical Tank component and bind it to the Slider component's Value property.
- Next, add an instance of the Tank2 template onto a window. In this example, we added three instances.
- Bind the tankUDT property to each of the UDT instances. In the image below, we selected the Tank 3 instance and bound the tankUDT template property to the Tank 3 Tag. The Tag bindings to the UDTs can even be made indirect to allow the passed UDT to be changed at runtime.