UInstancedStaticMeshComponent is undefined

i am getting a stupid error i can’t create instanced staticmesh components becauseit keeps on saying it’s undefined i even tried including the InstancedStaticMeshComponent.h header file but it keeps on giving this error and its realy annoying me can some one please post the correct way of setting up and using InstancedStaticMeshComponent in an actor in c++ i might be making a stupid mistake i am not aware of

`// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#pragma once
#include “GameFramework/GameMode.h”
#include “InstancedStaticMeshComponent.h”
#include “NewGameMode.generated.h”

UCLASS(minimalapi)
class ANewGameMode : public AGameMode
{
GENERATED_BODY()

UInstancedStaticMeshComponent * StupidError;

public:
NewGameMode(const FObjectInitializer& ObjectInitializer);
};
`

Hello, a_najafi

In this situation, please ensure that your class has been successfully added to the project and no errors occurred during the process.
Please note that if you use Visual Studio and IntelliSense is enabled, there is a possibility of false-positive error messages of this kind. However, you should still be able to build your project.
Also, the proper include command in this case is

#include "Components/InstancedStaticMeshComponent.h"

(since the header file is in Components folder).

Hope this helped!
Good luck!

Yes your right. thanx for the reply :wink: