# Load static meshes at runtime freezes game

**URL:** <https://forums.unrealengine.com/t/load-static-meshes-at-runtime-freezes-game/319196>\
**Category:** Asset Creation\
**Tags:** unreal-engine, freezing, question\
**Created:** [May 20, 2015, 8:38am UTC](https://forums.unrealengine.com/t/load-static-meshes-at-runtime-freezes-game/319196 "2015-05-20T08:38:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_0e2baaa3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0e2baaa3](https://forums.unrealengine.com/u/anonymous_user_0e2baaa3)\
**Post date:** [May 20, 2015, 8:38am UTC](https://forums.unrealengine.com/t/load-static-meshes-at-runtime-freezes-game/319196/1 "2015-05-20T08:38:48Z")

</div>

i attach static meshes to actor at runtime from code using code from wiki

```
 AssetSM_StaticMesh = LoadStaticMeshFromPath(FName(*ModelName));
    
    				StaticMesh = NewObject<UStaticMeshComponent>(this);
    
    				StaticMesh->SetStaticMesh(AssetSM_StaticMesh);
    				
   
    				StaticMesh->SetVisibility(true, true);
    
    	
    				StaticMesh->RegisterComponent();
    
    				StaticMesh->AttachTo(RootComponent);

```

but this freezes game at 1 - 2 seconds. mesh is very simple have 200 triangles and one simple material with base and normal textures their size 1024х1024.
