Targets - rmfandyplayz/UnityUIAnimationTools GitHub Wiki

Each step animates one object. Which one depends on two fields: the target slot (its name depends on the step type, like Canvas Group or Rect Transform) and the Target Path under it.

You fill in The step animates
Nothing The object the player is on. This is the usual case.
The Target Path The object at that path, e.g. Panel/Icon
The target slot Exactly the object you dragged in. The Target Path is ignored and greyed out.

Target Path

A Target Path finds an object by name, starting from the player's object:

Target Path Finds
(empty) the player's own object
Icon a child called Icon
Panel/Icon Icon, inside a child called Panel
.. the player's parent
../Title a child of the parent called Title (a sibling)
../../Other a child of the grandparent called Other

Names must match exactly. Hidden (inactive) objects are found too, which is what lets a Set Active step switch a hidden child back on.

Why bother with paths when you can just drag things in? Because an animation that uses only paths works on any object with the same layout. Copy it to another button, or put it in an Animation Set, and it drives that button's own Icon rather than the original's. A dragged-in slot always points at that one specific object.

Tip

A common layout is to put the player on a child object called Animations, and point its steps at the button above it with ... That keeps the button's own components uncluttered, and still shares cleanly.

If a target is wrong

If a path matches nothing, or the object is missing the component the step needs (a Canvas Group Alpha step on an object with no Canvas Group), the step shows a ⚠ in the Inspector straight away, with a warning explaining why. In the game it's skipped with one warning in the Console. It never falls back to animating some other object. See Warnings and Common Issues.

Which component each step needs

  • Graphic Color / Graphic Alpha need a Graphic: an Image, RawImage, legacy Text, or a TextMeshPro text. There's no separate TextMeshPro step type.
  • Canvas Group Alpha needs a Canvas Group.
  • Material Float / Material Color need a UI Material Instance. See Material and Shader Properties.
  • Play Sound takes an Audio Source, and an empty slot means something a bit different there. See Sound.
  • Set Active works on any GameObject.
  • Custom Property needs whichever component its property is on. See Custom Property.
  • Every other step (position, size, scale, rotation, punch and shake) needs a RectTransform, which every UI object has.
Under the hood
  • Target Path uses transform.Find. .. works because Find("..") returns the parent (verified in Unity 6000.3). It's resolved one segment at a time, so ../Self means "a child of my parent named Self", not "me".
  • Paths are resolved once, at Awake, not every frame.
  • A path that misses resolves to nothing rather than to the player, on purpose: a mistyped Panel/Icon that silently scaled the whole panel would be far harder to spot than a step that visibly does nothing. It warns once, not on every Play.
  • When the slot is filled, the path isn't even looked up, so a stale path under a filled slot can't cause a warning.
  • A Play Sound step whose path misses still plays, on the shared audio source, since its slot is optional anyway.
⚠️ **GitHub.com Fallback** ⚠️