# Why can I not see any static mesh?

**URL:** <https://forums.unrealengine.com/t/why-can-i-not-see-any-static-mesh/471463>\
**Category:** Asset Creation\
**Tags:** unreal-engine, question\
**Created:** [September 16, 2020, 11:30pm UTC](https://forums.unrealengine.com/t/why-can-i-not-see-any-static-mesh/471463 "2020-09-16T23:30:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Susp\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Susp\_1](https://forums.unrealengine.com/u/Susp_1)\
**Post date:** [September 16, 2020, 11:30pm UTC](https://forums.unrealengine.com/t/why-can-i-not-see-any-static-mesh/471463/1 "2020-09-16T23:30:53Z")

</div>

I have in my header file:

`UPROPERTY(EditAnywhere, Category = "Static Mesh") UStaticMesh *mesh; UStaticMeshComponent *meshComponent;`

and in my constructor I have:

`meshComponent = CreateDefaultSubobject("Mesh"); if (mesh) meshComponent->SetStaticMesh(mesh);`

In the details panel in the editor I have the static mesh set to the cube, nothing shows up, why is this and what am I doing wrong?

---

<div class="post-metadata">

**Author:** ![GEODVS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GEODVS](https://forums.unrealengine.com/u/GEODVS)\
**Post date:** [September 17, 2020, 1:49am UTC](https://forums.unrealengine.com/t/why-can-i-not-see-any-static-mesh/471463/2 "2020-09-17T01:49:36Z")

</div>

Hi,

Please try this. Hope it helps.

```
/** HEADER */
private:
/** set the static mesh of actor */
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Static Mesh", meta = (AllowPrivateAccess = "true"))
class UStaticMeshComponent* MeshComponent;

// CPP FILE
// need to include in cpp file
#include "Components/StaticMeshComponent.h"

MeshComponent = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh"));
RootComponent->SetupAttachment(MeshComponent());
```
