# Help with casting in a ui object

**URL:** <https://forums.unrealengine.com/t/help-with-casting-in-a-ui-object/1425991>\
**Category:** Programming & Scripting\
**Tags:** casting, unreal-engine, objects, UI, Blueprint, question\
**Created:** [November 27, 2023, 3:22pm UTC](https://forums.unrealengine.com/t/help-with-casting-in-a-ui-object/1425991 "2023-11-27T15:22:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gamelord06](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gamelord06](https://forums.unrealengine.com/u/Gamelord06)\
**Post date:** [November 27, 2023, 3:22pm UTC](https://forums.unrealengine.com/t/help-with-casting-in-a-ui-object/1425991/1 "2023-11-27T15:22:51Z")

</div>

Hey Everybody. I’m trying to get a variable from an object that isn’t in UI, and I need a reference for the wildcard. How do I get a reference similar to the object i’m casting to?

 ![Screenshot (44)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/f/e/afed4f276b170ba041ea5125c1a067a1cabc2588.png)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [November 27, 2023, 4:43pm UTC](https://forums.unrealengine.com/t/help-with-casting-in-a-ui-object/1425991/2 "2023-11-27T16:43:25Z")

</div>

You will need to explain what you’re doing, where your objects are, where / when this widget is created.

* * *

Chances are you do not need to cast, use tick, have widget pull data - the 3 signs that things could be organised better 😇

---

<div class="post-metadata">

**Author:** ![Gamelord06](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gamelord06](https://forums.unrealengine.com/u/Gamelord06)\
**Post date:** [November 28, 2023, 3:10pm UTC](https://forums.unrealengine.com/t/help-with-casting-in-a-ui-object/1425991/3 "2023-11-28T15:10:24Z")

</div>

I realize now that the thing that I was doing wouldn’t really work, so I found another solution. Thanks!
