# How do you invoke a method using reflection on a UObject?

**URL:** <https://forums.unrealengine.com/t/how-do-you-invoke-a-method-using-reflection-on-a-uobject/312381>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [March 24, 2015, 1:54pm UTC](https://forums.unrealengine.com/t/how-do-you-invoke-a-method-using-reflection-on-a-uobject/312381 "2015-03-24T13:54:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shadowmint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@shadowmint](https://forums.unrealengine.com/u/shadowmint)\
**Post date:** [March 24, 2015, 1:54pm UTC](https://forums.unrealengine.com/t/how-do-you-invoke-a-method-using-reflection-on-a-uobject/312381/1 "2015-03-24T13:54:33Z")

</div>

I’ve just read [Unreal Property System (Reflection) - Unreal Engine](https://www.unrealengine.com/blog/unreal-property-system-reflection) and I’m not extremely interested in being able to dynamically invoke a function from an object instance in C++.

I can get a reference to a UFunction \* using TFieldIterator, but I can’t figure out how to invoke it with it’s required arguments.

How can this be done?

The only example I can find in the engine source seems to be a vastly complicated RPC call…

---

<div class="post-metadata">

**Author:** ![Baron\_von\_Whimsy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Baron\_von\_Whimsy](https://forums.unrealengine.com/u/Baron_von_Whimsy)\
**Post date:** [June 11, 2018, 3:48am UTC](https://forums.unrealengine.com/t/how-do-you-invoke-a-method-using-reflection-on-a-uobject/312381/2 "2018-06-11T03:48:58Z")

</div>

For the sake of convenience, since this was the first result in Google, the answer can be found here:

> **[A sample for calling a UFunction with reflection?](https://forums.unrealengine.com/questions/7732/a-sample-for-calling-a-ufunction-with-reflection.html)**
>
> I'm wading into the unreal reflection system - trying to call a UFunction on an Actor. Is there a quick sample anyone has handy you could post that shows how to call a UFunction correctly? My attempts so far have crashed and burned.
