# Get a reference to all Widget Animations from one Widget and storing them in an array (automatically) or/and from a parentWidget.

**URL:** <https://forums.unrealengine.com/t/get-a-reference-to-all-widget-animations-from-one-widget-and-storing-them-in-an-array-automatically-or-and-from-a-parentwidget/1833404>\
**Category:** Blueprint\
**Tags:** reference, references, unreal-engine, Array, Widget, Blueprint, question\
**Created:** [April 30, 2024, 5:07pm UTC](https://forums.unrealengine.com/t/get-a-reference-to-all-widget-animations-from-one-widget-and-storing-them-in-an-array-automatically-or-and-from-a-parentwidget/1833404 "2024-04-30T17:07:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mar\_Olaf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mar\_Olaf](https://forums.unrealengine.com/u/Mar_Olaf)\
**Post date:** [April 30, 2024, 5:07pm UTC](https://forums.unrealengine.com/t/get-a-reference-to-all-widget-animations-from-one-widget-and-storing-them-in-an-array-automatically-or-and-from-a-parentwidget/1833404/1 "2024-04-30T17:07:50Z")

</div>

Here’s my setup:

- I have several animations on WidgetX. (also buttons …etc)
- All WidgetsX have a parent we’ll call it ParentWidget
- I have 1 behavior tree to each WidgetX (hence the X in BehaviorTreeX)
- there is only one WidgetX active at a time (they are pages, when u switch pages the old page is hidden)
- MyPlayerController has a reference to ParentWidget from which I usually get all my references.

Desired Result:  
I want to play a specific widget animation from BehaviorTreeX without having to do a lot of manual work and make it idiot proof. (I am currently adding by hand on WidgetX’s event graph each widget animation to an AN\_arrayWidgetAnimations “aka. not ideal”) then getting a reference to that array from my player controller.

Here’s my issue:

- I have tried to use the same logic I used for getting a reference to all the buttonsWidgets from ParentWidget; but with widget animations it won’t work the same. I cannot get all widgets animations and store them automatically into an AN\_arrayWidgetAnimations.
- Then, from the behavior tree get a reference to that AN\_arrayWidgetAnimations and compare the display name of each animation to a string variable I have edited on my behavior tree.
- Which would force me to copy and paste the display name into the string variable, but that is a result I’m okay with.

This system is FAR from ideal, there are many variable for error and at all not idiot proof. I’m trying to develop a tool to share with others, and this is just MEH design to say the least.  
I wish I could simply:

- Get reference to ParentWidget
- Get all Widgets Animations
- For each loop
- Get display name + equal condition + branch (compare display name to string variable)
- Play animation

Or even better: (inside the BehaviorTreeX)

- Get reference to ParentWidget
- all Widget Animations
- get a dropdown menu of each animation available on WidgetX
- Select the animation to play and call it a day!
