Before exporting to Unity, you need to set your anchors and props.
An anchor is an attachment point you can use to bind one or several props to a specific location that is predefined by the anchor.
A prop is a game item that will be attached to an anchor. It could be a stick held within the character’s hand, a helmet attached to the character’s head...the possibilities are endless. Props are easy to turn on or off, and easily swappable from within Harmony or Unity.
- Create a new Drawing layer and rename it according to the anchor you are creating.
- Inside the Layer Properties of your drawing layer, make sure that pivot option is set to Don’t Use Embedded Pivot or Apply Embedded Pivot on Drawing Layer. The Apply Embedded Pivot on Parent Peg does not transition well to Unity and you will lose your pivot information.
- Once this is done, you can use any of the animation tools to reposition the pivot point of your layer, such as the Rotate tool in the Advanced Animation toolbar. You should be able to see the pivot coordinates from the Layer Properties of your Drawing layer. If the pivot is not repositioned, its default place will be at the centre of your Harmony scene (0,0).
- Once this is set up, select the Drawing layer and click the Toggle Anchor button in the Game toolbar. You can also make a multi-selection to set an anchor on multiple Drawing layers simultaneously.
The Drawing layer is highlighted in red in the Timeline
- Create a new Drawing layer or take an existing prop on which you want to attach an anchor.
- Position the Drawing Pivot of the prop layer using a tool on the Advanced Animation toolbar, such as the Rotate tool. The position of the prop’s pivot will align with that of the anchor. Make sure it is positioned accordingly.
- With the prop Drawing layer selected, click the Toggle Prop button in the Game toolbar. You can also make a multi-selection to set a prop on multiple Drawing layers simultaneously.
The prop Drawing layer is highlighted in green in the Timeline
- Do one of the following:
- Connect the anchor and prop to the parent peg.
- Connect the prop under the anchor to create a parent/child hierarchy.