Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

how to fix (or suppress) incorrect "function is inaccisible" squigles


I am just getting started with Unreal and am following the "Unreal Engine 4x by Example" book. I am having an issue with Visual Studios intellisense where it is incorrectly attributing errors to working code, saying that the function is "inaccessible".

The code works fine, but the false-errors in the IDE are very annoying. Does anyone know how to fix, or at least suppress these errors?

code snippet:

 UStaticMeshComponent* SphereVisual = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("SphereMesh"));

 ConstructorHelpers::FObjectFinder<UStaticMesh> SphereAsset(TEXT("/Game/StarterContent/Shapes/Shape_Sphere.Shape_Sphere"));

 ConstructorHelpers::FObjectFinder<UMaterial> SphereMaterial(TEXT("/Game/StarterContent/Materials/M_Metal_Burnished_Steel.M_Metal_Burnished_Steel"));
 if (SphereAsset.Succeeded() && SphereMaterial.Succeeded()) {
     SphereVisual->SetRelativeLocation(FVector(0.0f, 0.0f, -50.0f));
     SphereVisual->SetMaterial(0, SphereMaterial.Object); // <--- set material shows an intellisense error 

screenshot of the error: alt text

I have seen some suggest just turning off error reporting as a whole, but I'm hoping there might be a way to not throw the baby out with the bath water.


Product Version: UE 4.20
more ▼

asked Jul 23 '18 at 12:29 AM in C++ Programming

avatar image

1 2 2

avatar image mesterKG Aug 02 '18 at 05:22 PM

I'm having the same issue. Lotsa functions are reported as inaccessible by intellisense.. or Resharper in my case. It compiles and works, but very annoying and makes me spend time looking at issues that aren't issues.

I've tried to clear the resharper cache and such without any luck. I do think it is because these functions are not explicitly set as public in the classes. Instead this is left to the GENERATED_UCLASS_BODY() macro.

This didn't use to be a problem, so maybe something changed with 4.20?


(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

This could be caused by this https://issues.unrealengine.com/issue/UE-62042


more ▼

answered Aug 03 '18 at 12:05 AM

avatar image

6 1 3

avatar image Laserath Sep 23 '18 at 07:11 AM

Yep, looks like it was that issue, fixed on 4.20.3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

The issue is caused by generated headers and intellisense not knowing where to look for. You can solve this by adding all Intermediate/Build/Win64/UE4Editor/Inc/* folders to your include path. You may need to look for additional plugins. Side not: this errors should not affect compiling. You want to look for the ones in the Engine folders as much as the ones from your project folder.

more ▼

answered Sep 23 '18 at 01:52 PM

avatar image

263 2 4 6

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question