# How to create a placeable actor that you can assign a static mesh in the editor?

**URL:** <https://forums.unrealengine.com/t/how-to-create-a-placeable-actor-that-you-can-assign-a-static-mesh-in-the-editor/102856>\
**Category:** UDK Programming and UnrealScript\
**Tags:** unreal-engine\
**Created:** [November 20, 2017, 1:31am UTC](https://forums.unrealengine.com/t/how-to-create-a-placeable-actor-that-you-can-assign-a-static-mesh-in-the-editor/102856 "2017-11-20T01:31:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Coldscooter](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Coldscooter](https://forums.unrealengine.com/u/Coldscooter)\
**Post date:** [November 20, 2017, 1:31am UTC](https://forums.unrealengine.com/t/how-to-create-a-placeable-actor-that-you-can-assign-a-static-mesh-in-the-editor/102856/1 "2017-11-20T01:31:23Z")

</div>

I’m trying to create my own actor that is placeable in the editor. And i’d like to allow it to be dynamically assigned a static mesh actor in the editor.

How would i do this? Here’s what i have:

```auto

class MyFluidSurfaceActor_River extends Actor
placeable;

var StaticMeshComponent RiverMesh;

defaultproperties
{    
    Begin Object class=StaticMeshComponent Name=StaticMeshComp
        StaticMesh=StaticMesh'ColdItems.StaticMeshes.crate' //Placeholder
    End Object
    RiverMesh=StaticMeshComp
    Components.Add(StaticMeshComp)
}

```

In this case i’d like to assign the static mesh in the StaticMeshComp within the editor (so i can reuse this actor with lots of different meshes).

Any help would be much appreciated.

Thanks

---

<div class="post-metadata">

**Author:** ![CobaltUDK](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/cobaltudk/32/1194497_2.png) [@CobaltUDK](https://forums.unrealengine.com/u/CobaltUDK)\
**Post date:** [November 20, 2017, 2:26am UTC](https://forums.unrealengine.com/t/how-to-create-a-placeable-actor-that-you-can-assign-a-static-mesh-in-the-editor/102856/2 "2017-11-20T02:26:59Z")

</div>

var() StaticMeshComponent RiverMesh; ?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f7db3d16](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f7db3d16](https://forums.unrealengine.com/u/anonymous_user_f7db3d16)\
**Post date:** [November 21, 2017, 1:01am UTC](https://forums.unrealengine.com/t/how-to-create-a-placeable-actor-that-you-can-assign-a-static-mesh-in-the-editor/102856/3 "2017-11-21T01:01:20Z")

</div>

class PBMainActor extends Actor  
ClassGroup(PBSkeletalMeshes)  
placeable;

Make the ClassGroup(ColdsStaticMeshes) or any name you like. then go into editor and you’ll see it there under your new name

```auto

class MyFluidSurfaceActor_River extends Actor
ClassGroup(ColdsStaticMeshes)
placeable;

var StaticMeshComponent RiverMesh;
var() StaticMesh ColdsModel;//this will allow you to hit f4 and add in what ever model you want,
once you've added MyFluidSurfaceActor_River to your map

function PostBeginPlay()
{
  local bool AreWeMade;

  AreWeMade = RiverMesh.SetStaticMesh(ColdsModel);
     `log("MyFluidSurfaceActor_River::PostBeginPlay() Has Started up!, Is the test MyFluidSurfaceActor_River Running = " @ AreWeMade);
} 

defaultproperties
{
    Begin Object class=StaticMeshComponent Name=StaticMeshComp
           StaticMesh=StaticMesh'ColdItems.StaticMeshes.crate' //Placeholder
    End Object
    RiverMesh=StaticMeshComp
    Components.Add(StaticMeshComp)
}

```

that should get what you want working; enjoy.

---

<div class="post-metadata">

**Author:** ![Coldscooter](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Coldscooter](https://forums.unrealengine.com/u/Coldscooter)\
**Post date:** [November 21, 2017, 3:25am UTC](https://forums.unrealengine.com/t/how-to-create-a-placeable-actor-that-you-can-assign-a-static-mesh-in-the-editor/102856/4 "2017-11-21T03:25:50Z")

</div>

Awesome, that worked perfectly. Thank for the help guys 😉
