# Call inline c++ function in blueprint

**URL:** <https://forums.unrealengine.com/t/call-inline-c-function-in-blueprint/334870>\
**Category:** Blueprint\
**Tags:** calling-a-function, unreal-engine, functions, Blueprint, question\
**Created:** [October 10, 2015, 2:04pm UTC](https://forums.unrealengine.com/t/call-inline-c-function-in-blueprint/334870 "2015-10-10T14:04:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vahid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vahid](https://forums.unrealengine.com/u/Vahid)\
**Post date:** [October 10, 2015, 2:04pm UTC](https://forums.unrealengine.com/t/call-inline-c-function-in-blueprint/334870/1 "2015-10-10T14:04:35Z")

</div>

Hi everyone  
I want to know how i can call this function in blueprint?

```
INLINE bool isInSightRange(float d)
{
	return d < SightSphere->GetScaledSphereRadius();
}
```

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [October 10, 2015, 2:17pm UTC](https://forums.unrealengine.com/t/call-inline-c-function-in-blueprint/334870/2 "2015-10-10T14:17:19Z")

</div>

If UFUNTION (BlueprintCallable) does not work, then make non-inline funtion that does call that function

---

<div class="post-metadata">

**Author:** ![Vahid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vahid](https://forums.unrealengine.com/u/Vahid)\
**Post date:** [October 12, 2015, 6:39am UTC](https://forums.unrealengine.com/t/call-inline-c-function-in-blueprint/334870/3 "2015-10-12T06:39:18Z")

</div>

didn’t work

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [October 12, 2015, 3:12pm UTC](https://forums.unrealengine.com/t/call-inline-c-function-in-blueprint/334870/4 "2015-10-12T15:12:40Z")

</div>

So that function does not work in C++ too?

---

<div class="post-metadata">

**Author:** ![Vahid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vahid](https://forums.unrealengine.com/u/Vahid)\
**Post date:** [October 12, 2015, 3:33pm UTC](https://forums.unrealengine.com/t/call-inline-c-function-in-blueprint/334870/5 "2015-10-12T15:33:20Z")

</div>

I made another function…

UFUNCTION(BlueprintCallable)  
bool BPVersion();

and then from this new function i called inline function like this:  
bool AMyCharachter::BPVersion()  
{  
return isInSightRange( somecalc);  
}

I can now call this function from BP

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [October 12, 2015, 7:49pm UTC](https://forums.unrealengine.com/t/call-inline-c-function-in-blueprint/334870/6 "2015-10-12T19:49:53Z")

</div>

But isn’t this what you wanted? or you misspell can’t? Did you type in category that node should be in, it required as i know and UHT with throw error if it’s missing?

---

<div class="post-metadata">

**Author:** ![Vahid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vahid](https://forums.unrealengine.com/u/Vahid)\
**Post date:** [October 12, 2015, 8:00pm UTC](https://forums.unrealengine.com/t/call-inline-c-function-in-blueprint/334870/7 "2015-10-12T20:00:35Z")

</div>

I forget to type category here,  
I wanted to directly call inline function but this way has a extra calling but everything is ok.
