Empty Project can't #include "Components/InstancedSkinnedMeshComponent.h"

DoctorBrowne
Sat, 27 Dec 2025 05:00:38 +0000
C++

When I try to
include “Components/InstancedSkinnedMeshComponent.h”

I get the following error when building:

InstancedSkinnedMeshComponent.h(296, 2): [C3837] attributes are not allowed in this context

Empty default c++ 5.7 project.

I’m confused why the error would be in the instanced skinned mesh component, as it’s in the engine and working. Is there something else I need to do to get access to the skeletal mesh ISM?

It is an experimental feature for the new Nanite Foliage.

Here’s an exact example of the default created component made from inheritance.

```
#pragma once

include “CoreMinimal.h”
include “Components/InstancedSkinnedMeshComponent.h”
include “AsmrInstancedSkinnedMeshComponent.generated.h”

UCLASS(Blueprintable, ClassGroup=(Rendering), meta=(BlueprintSpawnableComponent))
class ASMR_API UMyInstancedSkinnedMeshComponent : public UInstancedSkinnedMeshComponent
{
GENERATED_BODY()

public:
// Sets default values for this component’s properties
UMyInstancedSkinnedMeshComponent();
};
```

9 posts - 5 participants