# Function is inaccessible

**URL:** <https://forums.unrealengine.com/t/function-is-inaccessible/433462>\
**Category:** Pipeline & Plugins\
**Tags:** unreal-engine, Visual-Studio, CPP, question, function-signature\
**Created:** [September 9, 2018, 9:52am UTC](https://forums.unrealengine.com/t/function-is-inaccessible/433462 "2018-09-09T09:52:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![belhadj\_hmida](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@belhadj\_hmida](https://forums.unrealengine.com/u/belhadj_hmida)\
**Post date:** [September 9, 2018, 9:52am UTC](https://forums.unrealengine.com/t/function-is-inaccessible/433462/1 "2018-09-09T09:52:05Z")

</div>

I am having a problem with visual studio of inaccessible function in the engine like UKismetSystemLibrary::DrawDebugSphere appears underlined with red

 ![253154-capture-decran-28.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/4/3/343d575f01d04d978d2c0608eef116c516a074b6.png)

but it is ignored in compilation (no errors), i am asking because i rely on intellisense and that blocks it from working.  
PS: i think this is caused by the default private encapsulation because there is no public above functions’ declaration.

---

<div class="post-metadata">

**Author:** ![cridia](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/cridia/32/772487_2.png) [@cridia](https://forums.unrealengine.com/u/cridia)\
**Post date:** [September 9, 2018, 10:36am UTC](https://forums.unrealengine.com/t/function-is-inaccessible/433462/2 "2018-09-09T10:36:18Z")

</div>

As far as I know, intellisense is not the best thing to rely on when programming in UE4. I have had countless of instances were intellisense thought something was wrong, but nothing was actually wrong.

---

<div class="post-metadata">

**Author:** ![belhadj\_hmida](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@belhadj\_hmida](https://forums.unrealengine.com/u/belhadj_hmida)\
**Post date:** [September 9, 2018, 11:15am UTC](https://forums.unrealengine.com/t/function-is-inaccessible/433462/3 "2018-09-09T11:15:00Z")

</div>

As i said the problem is that by default in c++ class members are private and that’s why intellisense is blocked, i don’t want to change engine classes even by adding a null-effecting public above function.

---

<div class="post-metadata">

**Author:** ![belhadj\_hmida](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@belhadj\_hmida](https://forums.unrealengine.com/u/belhadj_hmida)\
**Post date:** [September 9, 2018, 11:24am UTC](https://forums.unrealengine.com/t/function-is-inaccessible/433462/4 "2018-09-09T11:24:59Z")

</div>

i add “public:” in KismetSystemLibrary.h at line 258 and that solved my problem.

 ![253155-capture-decran-30.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/a/d/eadd340040872f315760cc9f87b9b16d5d1a0ac9.png)

prove:

 ![253156-capture-decran-31.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/b/d/7bd308a7fb6dcd28a3c79b8a5ff98136c0aa80e8.png)
