Tags

A tag is a keyword that allows you to access some object that has this tag.

In MANU, you can assign a tag to almost all objects. Tags can be used as animation objects or objects in triggers. Because of this, you can access the parameters and variables of objects that have this tag.

Thus, the tag allows you to select some common parameters even for dissimilar objects and animate them at the same time. This makes it easier to work with a large number of identical objects or objects with similar parameters.

Creating tags

Let's look at a simple example. In the Scene, there are green and red buttons, as well as a Clock with a clock hand.

Let's say when the Main Character jumps on the green button, the clock hand will move clockwise; and when the Main Character jumps on the red button, then the clock hand will rotate counterclockwise. Normally, we would need to create an animation for each button. We would make 4 animations where the same clock hand would be used as the animation target.

In MANU, we can use Tags to manage multiple objects through just one animation.

Tag “green”

Let's start with the green buttons.

  • Click on the green button.

  • Then go to the Inspector Panel on the right; find Tags with the input field there.

  • To add a tag, click on the input field and start typing. For example, “green”.

  • Press Enter and you have just created a Tag.

Now we pick the second green button.

  • Then we go to the Inspector Panel on the right and click on the tag input field.

  • After that we will see a dropdown list with created tags.

  • Since we have created only one “green” tag so far, we see only it in our list.

  • As we create new tags, we will have a bigger list of tags.

  • Next, we assign this tag “green” to the second green button.

For convenience and visibility, we can mark tags with colors. Let's put our tag in green.

  • Just hover over the created tag in the input field and by right-clicking open the context menu.

  • Then, choose a green color.

Color marking is needed to distinguish tags from each other or to highlight more important tags.

Animation

Now we will create an animation that will move the clock hand clockwise. Let's call this animation - Animation Clockwise (Animation CW).

Open the Timeline Panel, add a clock hand (or Arrow) as animation target. Let it rotate 30 degrees in half a second.

Next, go to the Trigger Panel and choose the following trigger: Collision->Continue. Let's choose the Main Character and the green tag as the objects of the collision.

So, while the interaction of our Main Character with another object that has the “green” tag continues, then our animation will go on and the clock hand will be moving clockwise.

In fact, we can change any properties/parameters that are peculiar to the object. If they have some of their common properties that fall under this tag, then we can animate them.

Objects can be of different types and animation can be any. However, if a certain parameter is missing for some objects united by one tag, then animation for these objects will not be performed, but only for those that have this parameter.

The green button can be copied and it will be duplicated along with the tag and the animation we created.

Game mode

Switch to the game mode. We see that as soon as our Main Character hops on the object with the tag “green”, the clock hand begins to rotate clockwise.

Tag “red”

Let's now create a tag for the red button and call it “red”. For convenience, we will mark it in red.

Next, we will assign the tag “red” to all red buttons. Let's create a new animation – Animation Counterclockwise (Animation CCW). In the Timeline Panel, we will select the appropriate animatable parameter for our clock hand (Arrow) to make it move counterclockwise.

In the Trigger Panel, we will select the Collision Continue Trigger. We choose our Main Character and the red tag as the objects of the collision. This will mean that the Animation CCW created by us will continue while the Main Character interacts with an object that has the tag “red”. In our case, these are red buttons.

Game mode

Let’s switch to the game mode. Now, when the Main Character jumps on the red buttons, the clock hand moves counterclockwise; and when it jumps on the green ones, the clock hand rotates clockwise.

If we need more red and green buttons, then we should not create new animations for them. It's enough to assign the created tags to them. We can also create other objects and assign tags to them (“red” or “green”), the clock hand will react to them accordingly.

Tag as an animation target

In MANU, you can animate all objects with one tag at the same time. To do this, just add a tag to the Timeline Panel, select Animatable Parameters and the desired trigger.

Thus, all objects with the same tag will be animated. So, the target of the animation will not be one object, but all objects that have this tag.

For example, let's add an animation where all objects with the tag “green” will move along the Y axis when the Main Character jumps on them.

To do this, add the tag “green” to the Time Panel, select the Position Y parameter and set the needed values for it.

In the Trigger Panel, choose the Collision Continue Trigger.

In the game mode, you will see that when the Main Character jumps on the green button, all objects with the tag “green” will start moving up and down along the Y-axis.

Rename tag

If in the process of the game development you have a need to rename the tag, click on the object with the tag. Hover over the tag and double click on it. Then just rename the tag. For example, “green” to “supergreen”.

Note: A tag can't consist of two or more words; tags can have only one word. You can use letters and numbers in the tag name. Moreover, special characters cannot be used in the tag name, except for the underscore "_" .

Some examples of tag names: super_green or 123.

You can also rename the tag using the context menu that appears when you right-click on the tag in the Inspector Panel on the right. Just select Rename Tag from the suggested menu.

Removing a tag from an object

To remove a tag from an object, click on the object. In the Inspector Panel on the right, hover over the tag. Next, (x) - a remove button will appear on the tag. Click on it and the tag will be removed from the object. The selected object no longer has this tag and created animations stop working for it. Also you can place field cursor after tag and press "Backspace" to delete tag.

Deleting a tag from a project

To delete the tag completely from the project, click on any object that has this tag. Go to the Inspector Panel and right-click on the tag. Then select Delete Tag from the appeared context menu.

When you select this option, you will receive a warning that this tag is used by some objects in the scene. The warning shows how many objects and animations depend on this tag. Therefore, the removal of the tag must be authorized.

If you delete the tag, then all the animations linked with it will be “No object". In this case, you can delete the animation or make a Retarget on another object.

Note: The action of removing a tag from a project is an irreversible step/process. You will not be able to return the tag back, only create it again.

Using Tags in the Scene Tree Hierarchies

MANU allows you to create a hierarchy of folders in the Scene Tree and assign a tag to the entire folder. This will mean that the tag will be assigned to all objects located in the folder. By creating hierarchies, you can create only one tag that will control animations in the entire scene.

Scene with light sources

Let's look at the following scene. Suppose we have a Scene with a building and several light sources (lights in the building, including lights in two different rooms, and outdoor lights), which are controlled only by one tag “Lights”.

Game mode

Let’s see how it works in the game mode. In the Scene, we see 4 buttons in front of the building. The first button controls the light in the entire scene. This means that when the Main Character steps on it, all light sources in the Scene turn on, including outdoor and indoor lights.

The second button controls the light only outside the building. The streetlights will turn on as soon as the Main Character jumps on the second button.

The third button turns on the light inside the building (in all rooms) when the Main Character and the third button collide.

The fourth button turns on the light in the first room and the fifth button turns on the light in the second room if the Main Character steps on them accordingly.

The sixth button changes the light parameters throughout the scene while the Main Character is standing on this button

Tag “Lights” and hierarchy

Now let's see how the lighting control is implemented in this scene.

In the Scene Tree, we create a hierarchy of folders that describes the structure of the building.

In order to control the lighting in the entire scene, we don't need to create different tags for each light source. We create only one tag “Lights”and assign it to all light sources in the Scene.

Therefore, a properly organized hierarchy in the Scene Tree and the tag “Lights” will help us in controlling the lighting in the scene.

Animation for outdoor lights

To create an animation for outdoor lights, click the Add Object button on the Timeline Panel and select an object from the pop-up list. In our case, we should choose the Outdoor folder. Next, we choose Tags from the menu (at the very bottom of the list) and the tag “Lights”.

Now the tag parameters inside the Outdoor folder are available for change. So, choose parameters and the trigger that are needed.

And we are done! We have created animations for all objects in the Outdoor folder that have the tag “Lights”.

Animation for other light sources in the Scene

All animations in this Scene are created in the same way as for streetlights. The only thing is that each animation refers to its own object, or in our case a folder.

Last updated