# Adding variables from Python

**URL:** <https://forums.unrealengine.com/t/adding-variables-from-python/211317>\
**Category:** Editor Scripting\
**Tags:** unreal-engine\
**Created:** [April 1, 2021, 3:03pm UTC](https://forums.unrealengine.com/t/adding-variables-from-python/211317 "2021-04-01T15:03:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_4b67eefa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_4b67eefa](https://forums.unrealengine.com/u/anonymous_user_4b67eefa)\
**Post date:** [April 1, 2021, 3:03pm UTC](https://forums.unrealengine.com/t/adding-variables-from-python/211317/1 "2021-04-01T15:03:04Z")

</div>

Hello,

I want to create variables in Python for them to be procedurally added to my blueprint when I run my script. I am aware of getting and setting variables already set in the editor, and I understand, to get & set variables to the underlying blueprint, we must must make changes to the default object version. As displayed below:

# get the generated class, using a different load method than assets

blueprint\_generated = unreal.load\_object(None, “/Game/NewBlueprint.NewBlueprint\_C”)

# from that, get the class default object ( the actual template for the blueprint )

blueprint\_class\_default = unreal.get\_default\_object(blueprint\_generated)

# set or get properties

blueprint\_class\_default.set\_editor\_property(“MyFloatValue”, 42) blueprint\_class\_default.get\_editor\_property(“MyInt”)

Instead of editing variables, I want to create them. Is this even possible?

Thank you,

C

---

<div class="post-metadata">

**Author:** ![Kein](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kein](https://forums.unrealengine.com/u/Kein)\
**Post date:** [August 22, 2022, 10:58pm UTC](https://forums.unrealengine.com/t/adding-variables-from-python/211317/2 "2022-08-22T22:58:56Z")

</div>

I’ve been looking into this myself and went over whole API but I dont believe this is possible with Epic’s implementation of Python. There was a 3rd party one ages ago that had this functionality.

---

<div class="post-metadata">

**Author:** ![user\_9c4c309b316eccdb91f369dde86ca2abbef645e8dd07da2db000fb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@user\_9c4c309b316eccdb91f369dde86ca2abbef645e8dd07da2db000fb](https://forums.unrealengine.com/u/user_9c4c309b316eccdb91f369dde86ca2abbef645e8dd07da2db000fb)\
**Post date:** [September 26, 2023, 5:13pm UTC](https://forums.unrealengine.com/t/adding-variables-from-python/211317/3 "2023-09-26T17:13:47Z")

</div>

I’m also trying to do that but it seems impossible 😭
