# How can I change actor's default properties on runtime with c++?

**URL:** <https://forums.unrealengine.com/t/how-can-i-change-actors-default-properties-on-runtime-with-c/409528>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [November 13, 2017, 7:56pm UTC](https://forums.unrealengine.com/t/how-can-i-change-actors-default-properties-on-runtime-with-c/409528 "2017-11-13T19:56:50Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Dune](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dune](https://forums.unrealengine.com/u/Dune)\
**Post date:** [November 14, 2017, 10:15am UTC](https://forums.unrealengine.com/t/how-can-i-change-actors-default-properties-on-runtime-with-c/409528/4 "2017-11-14T10:15:48Z")

</div>

The constructor for a code class is usually called when first spawned but also when open in the editor (I believe so that things changed there are also displayed in the editor). Although I’m not actually sure from your explanation what you are trying to achieve?

You can use the Defereed method, or simply create a function called Initialise on your class, and after spawning the actor, use this function to set any variables right away?

---

_[View the full topic](https://forums.unrealengine.com/t/how-can-i-change-actors-default-properties-on-runtime-with-c/409528)._
