# Compiler Error when including InstancedSkinnedMeshComponent.h 

**URL:** <https://forums.unrealengine.com/t/compiler-error-when-including-instancedskinnedmeshcomponent-h/2706089>\
**Category:** Platform & Builds\
**Tags:** Epic-Pro-Support, unreal-engine, question\
**Created:** [February 10, 2026, 11:27pm UTC](https://forums.unrealengine.com/t/compiler-error-when-including-instancedskinnedmeshcomponent-h/2706089 "2026-02-10T23:27:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [February 10, 2026, 11:27pm UTC](https://forums.unrealengine.com/t/compiler-error-when-including-instancedskinnedmeshcomponent-h/2706089/1 "2026-02-10T23:27:16Z")

</div>

Linking this forum thread as it is the exact same issue I am running into.

> [@Empty Project can't #include "Components/InstancedSkinnedMeshComponent.h"](https://forums.unrealengine.com/t/empty%5C-project%5C-cant%5C-include%5C-components%5C-instancedskinnedmeshcomponent%5C-h/2687910/8):
>
> Did you find a solution to this, that doesn’t involve getting the engine source code? I’d rather just stick with the binaries from the launcher. I don’t understand how other files are able to include this one without running into the same issue honestly, unless the binaries were built with slightly different code then what’s provided.

I am attempting to include InstancedSkinnedMeshComponent.h in a cpp in a plugin. Just adding the include causes a compile error, “error C3837: attributes are not allowed in this context”.

It seems to be successfully included in other engine code, but including it anywhere in our project code fails to compile. I wasn’t able to ascertain why it worked in engine code and not ours.

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [February 10, 2026, 11:27pm UTC](https://forums.unrealengine.com/t/compiler-error-when-including-instancedskinnedmeshcomponent-h/2706089/2 "2026-02-10T23:27:19Z")

</div>

**Steps to Reproduce**  
Include InstancedSkinnedMeshComponent.h in another file. For the repro project it was added to the game project’s module cpp file.

---

<div class="post-metadata">

**Author:** ![Louimatic](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/louimatic/32/1223385_2.png) [@Louimatic](https://forums.unrealengine.com/u/Louimatic)\
**Post date:** [February 11, 2026, 10:48pm UTC](https://forums.unrealengine.com/t/compiler-error-when-including-instancedskinnedmeshcomponent-h/2706089/3 "2026-02-11T22:48:43Z")

</div>

Hi there,

As others in that thread have pointed out, this is caused by the UE\_EXPERIMENTAL macro in InstancedSkinnedMeshComponent.h. This macro will trigger a compilation warning on non-engine files.

There are a few ways to get around this without modifying the source code of the engine. The apparent preferred method is to wrap any calls to experimental classes with the PRAGMA\_DISABLE\_EXPERIMENTAL\_WARNINGS & PRAGMA\_ENABLE\_EXPERIMENTAL\_WARNINGS macros. e.g:

```auto
PRAGMA_DISABLE_EXPERIMENTAL_WARNINGS
#include "Components/InstancedSkinnedMeshComponent.h"
PRAGMA_ENABLE_EXPERIMENTAL_WARNINGS

```

There are quite a few examples of this in the engine code. However when doing some tests for this case I was unable to get this method to compile. I had much more success with the following methods:

- Adding bValidateExperimentalApi = false; to the build.cs will cause any experimental API calls for an entire module/plugin to be accepted.
- Adding bTreatAsEngineModule = true; to the build.cs will work similarly for modules other than the main game module (One that uses IMPLEMENT\_PRIMARY\_GAME\_MODULE). However it’s worth noting that this will also cause any Internal API calls to be accepted.

- Louis

---

<div class="post-metadata">

**Author:** ![Louimatic](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/louimatic/32/1223385_2.png) [@Louimatic](https://forums.unrealengine.com/u/Louimatic)\
**Post date:** [February 12, 2026, 9:16pm UTC](https://forums.unrealengine.com/t/compiler-error-when-including-instancedskinnedmeshcomponent-h/2706089/4 "2026-02-12T21:16:42Z")

</div>

Hi again,

Thank you for clarifying, I feel i couldn’t see the forest through the trees. Looking into this a bit more I think you are correct. This instance doesn’t adhere to the guidelines in the documentation and testing it with that change shows it to be working correctly. I will submit a bug report for this which you can track [here](https://issues.unrealengine.com/issue/UE-365552) once it is live on the public issue tracker.

Thanks for your help with this,

Louis

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [February 12, 2026, 5:28pm UTC](https://forums.unrealengine.com/t/compiler-error-when-including-instancedskinnedmeshcomponent-h/2706089/5 "2026-02-12T17:28:54Z")

</div>

To clarify, the macro is causing the compiler error C3837. Not the compiler warning C4996 used to warn about experimental code use.

The pragmas do not work because the macros suppress warnings about experimental code, it does not fix the compiler error which refers to the improper placement of an attribute.

I believe that, “class” needs to be before UE\_EXPERIMENTAL instead of after it. This change does appear to fix the C3837 error, and a bunch of experimental warnings are reported instead, some of which seem to come from engine code that may need to be pragma wrapped.

 ![image.png.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/8/3/483bf05fea9cbcc848bf44a1de0f46c443d836f9.png)

Using, “bValidateExperimentalApi=false” does work as a workaround for now. But I do believe there is an actual error here.
