You can add metadata notes to props, which will have a name and value. This metadata will be accessible in Unity. It will be visible in the Inspector view when the prop is selected in the Hierarchy view
You can use this mechanic to add properties to your props in Harmony, then use them in Unity. For example, if a character has a weapon for a prop, you could add the attack power of that weapon as a metadata note for the prop.
If the Metadata Editor view is not in your workspace, do one of the following:
- In the top-right corner of a view, click the Add View button and select Metadata Editor.
- In the top menu, select Windows > Metadata Editor.
- In the Timeline view, select the prop layer to which you want to add metadata.
- In the Node Metadata section, click on the Add Node Metadata Entry button to create a new metadata entry.
- In the Add Metadata dialog box, type in game. followed by the name of the metadata variable you want to add.
- Do one of the following:
- Click on the Add button if you want to add more metadata entries.
- Click on the Add and Close button to add this metadata entry and close the Add Metadata dialog.
The metadata entries you created as added to the Metadata Editor view, in the Node Metadata section.
In the Metadata Editor view, double-click on the cell right of the name of the new metadata entry, in the Value column, to edit the entry's value.
Type in the value for this metadata entry and press ENTER.
You now created a metadata entry with a name and value for your prop.
The name of the layer appears near the top of the Node Metadata section.
The Add Metadata dialog box appears.