# Calling a function on a Blueprint Class from a different C++ class

**URL:** <https://forums.unrealengine.com/t/calling-a-function-on-a-blueprint-class-from-a-different-c-class/873870>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [April 7, 2023, 4:55pm UTC](https://forums.unrealengine.com/t/calling-a-function-on-a-blueprint-class-from-a-different-c-class/873870 "2023-04-07T16:55:19Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Roy\_Wierer.Seda145](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roy_wierer.seda145/32/906551_2.png) [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Post date:** [April 7, 2023, 6:34pm UTC](https://forums.unrealengine.com/t/calling-a-function-on-a-blueprint-class-from-a-different-c-class/873870/4 "2023-04-07T18:34:24Z")

</div>

The issue is that you are trying to call functions on a UClass instead of on a spawned actor. You get that spawned actor pointer from the return value of the SpawnActor method (my example). That is what you need to call FindComponentByClass on.

> [[BP] Whats the difference between variable of class and object?](https://forums.unrealengine.com/t/bp-whats-the-difference-between-variable-of-class-and-object/292830)

---

_[View the full topic](https://forums.unrealengine.com/t/calling-a-function-on-a-blueprint-class-from-a-different-c-class/873870)._
