# How to access variable from an ability in a widget? (GAS)

**URL:** <https://forums.unrealengine.com/t/how-to-access-variable-from-an-ability-in-a-widget-gas/2731952>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [June 27, 2026, 6:02pm UTC](https://forums.unrealengine.com/t/how-to-access-variable-from-an-ability-in-a-widget-gas/2731952 "2026-06-27T18:02:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pastelfable](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pastelfable/32/1138306_2.png) [@pastelfable](https://forums.unrealengine.com/u/pastelfable)\
**Post date:** [June 27, 2026, 6:02pm UTC](https://forums.unrealengine.com/t/how-to-access-variable-from-an-ability-in-a-widget-gas/2731952/1 "2026-06-27T18:02:45Z")

</div>

This is kind of a dumb question. So I have a float variable on my abilities that I’m trying to access in a widget:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/f/9/3f9f6ec4c3c3ccfbf0e8a2f9a26e33f29ac66836.png)

The number value of the float corresponds to what type of ability it is, and I want to use this variable in a widget blueprint in order to set the order of abilities in my UI, but I can’t seem to figure out how to access the variable while I’m in the widget blueprint?

---

<div class="post-metadata">

**Author:** ![Countsie](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/countsie/32/1194632_2.png) [@Countsie](https://forums.unrealengine.com/u/Countsie)\
**Post date:** [June 27, 2026, 7:05pm UTC](https://forums.unrealengine.com/t/how-to-access-variable-from-an-ability-in-a-widget-gas/2731952/2 "2026-06-27T19:05:57Z")

</div>

What do you mean ‘float variable on your abilities’? Is this in a derived GA? if so, you can getasc-\>getgetallabilities, then loop thru the spec handles it returns. for each handle getgameplayabilityfromspec, cast to your GA type then access the variable from there.

---

<div class="post-metadata">

**Author:** ![pastelfable](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pastelfable/32/1138306_2.png) [@pastelfable](https://forums.unrealengine.com/u/pastelfable)\
**Post date:** [June 27, 2026, 7:20pm UTC](https://forums.unrealengine.com/t/how-to-access-variable-from-an-ability-in-a-widget-gas/2731952/3 "2026-06-27T19:20:09Z")

</div>

Yeah derived GA, should’ve specified that. I’ll try it!

---

<div class="post-metadata">

**Author:** ![RedGrimnir](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/redgrimnir/32/1054683_2.png) [@RedGrimnir](https://forums.unrealengine.com/u/RedGrimnir)\
**Post date:** [June 27, 2026, 7:30pm UTC](https://forums.unrealengine.com/t/how-to-access-variable-from-an-ability-in-a-widget-gas/2731952/4 "2026-06-27T19:30:10Z")

</div>

What @Countsie mentioned is simply right, however it got my attention since you mentioned “UI Ordering”.

If this variable is just for UI ordering, like distinguishing skill 1, 2, 3, 4 or ability types, maybe you don’t need that float variable at all.

You can simply give your abilities gameplay tags.

EX:  
Skill.Ranged  
Skill.Melee

Then from the widget you can get ASC → FindAllAbilitiesWithTags and query Skill.Ranged, and it will return all granted ranged abilities on that ASC.

So instead of casting every ability just to read a float, you can just classify them by tags and retrieve the granted abilities from ASC directly.

If you need strict slot order, then yes you can also add tags like Skill.Slot.1 / Skill.Slot.2 or use some UI data asset that correlates order, icon, name etc., but for just grouping skill types, gameplay tags should already solve it.
