# \[Question\] BP - Accessing default values of a variables

**URL:** <https://forums.unrealengine.com/t/question-bp-accessing-default-values-of-a-variables/276806>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [March 11, 2014, 4:38am UTC](https://forums.unrealengine.com/t/question-bp-accessing-default-values-of-a-variables/276806 "2014-03-11T04:38:01Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 4:38am UTC](https://forums.unrealengine.com/t/question-bp-accessing-default-values-of-a-variables/276806/1 "2014-03-11T04:38:01Z")

</div>

Okay so I have a need for accessing the default value of the GroundSpeed variable in my Character Blueprint’s Movement Component. I cant seem to find a way to get or set default values anywhere in the Blueprint editor, so Im curious if anyone knows where I can find this or if its there at all 8)

---

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 4:38am UTC](https://forums.unrealengine.com/t/question-bp-accessing-default-values-of-a-variables/276806/2 "2014-03-11T04:38:01Z")

</div>

Hi -

We plan on adding this feature once BP Comms are in. You’ll then be able to get the default object of anything, and then drag off and access any variable from it. The current hope is to get this in in time for the next beta, so you shouldn’t have to wait too long

---

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 4:38am UTC](https://forums.unrealengine.com/t/question-bp-accessing-default-values-of-a-variables/276806/3 "2014-03-11T04:38:02Z")

</div>

No worries I have a work around using temp variables I set on BeginPlay and just call those back when required. I just wanted to make sure they wernt actually there and I was just missing them, thanks 🙂

---

<div class="post-metadata">

**Author:** ![Ixiguis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ixiguis](https://forums.unrealengine.com/u/Ixiguis)\
**Post date:** [March 21, 2014, 2:02am UTC](https://forums.unrealengine.com/t/question-bp-accessing-default-values-of-a-variables/276806/4 "2014-03-21T02:02:44Z")

</div>

Was this feature added yet? How to use it?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_759e5c3a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_759e5c3a](https://forums.unrealengine.com/u/anonymous_user_759e5c3a)\
**Post date:** [March 21, 2014, 2:14am UTC](https://forums.unrealengine.com/t/question-bp-accessing-default-values-of-a-variables/276806/5 "2014-03-21T02:14:43Z")

</div>

Hello,

After you create a variable in your Blueprint, compile and then it will appear in your “Defaults” tab of the Blueprint Editor. From there you can set the default easily.

Cheers!

---

<div class="post-metadata">

**Author:** ![Ixiguis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ixiguis](https://forums.unrealengine.com/u/Ixiguis)\
**Post date:** [March 21, 2014, 2:19am UTC](https://forums.unrealengine.com/t/question-bp-accessing-default-values-of-a-variables/276806/6 "2014-03-21T02:19:21Z")

</div>

Sorry, I meant how to access a variable’s default from the event graph?

For instance: I modify a weapon’s damage from a BP function, then after some time, I want to set it back to whatever its default was (without having to save the default value in another variable).

In other words, the BP equivalent of:

```
GetClass()->GetDefaultObject()->SomeProperty
```

---

<div class="post-metadata">

**Author:** ![MonsOlympus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/monsolympus/32/619062_2.png) [@MonsOlympus](https://forums.unrealengine.com/u/MonsOlympus)\
**Post date:** [March 21, 2014, 5:55am UTC](https://forums.unrealengine.com/t/question-bp-accessing-default-values-of-a-variables/276806/7 "2014-03-21T05:55:26Z")

</div>

This was originally my question and this is what I meant also when I was asking because I was having to create new variables to hold the default values instead of being able to drag from a variable on the graph and access the default.

It could be possible to make some sort fo custom node that does this, I havent had the source until now so Im playing catch up on the c++ end.

---

<div class="post-metadata">

**Author:** ![Ixiguis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ixiguis](https://forums.unrealengine.com/u/Ixiguis)\
**Post date:** [March 30, 2014, 5:39am UTC](https://forums.unrealengine.com/t/question-bp-accessing-default-values-of-a-variables/276806/8 "2014-03-30T05:39:27Z")

</div>

Any news on this?

---

<div class="post-metadata">

**Author:** ![Enkidu\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Enkidu\_1](https://forums.unrealengine.com/u/Enkidu_1)\
**Post date:** [March 30, 2014, 5:49pm UTC](https://forums.unrealengine.com/t/question-bp-accessing-default-values-of-a-variables/276806/9 "2014-03-30T17:49:48Z")

</div>

I just added this BP function in C++ to solve this issue:

```
UObject* UMyBlueprintLibrary::GetDefaultObject(TSubclassOf<UObject> ObjectClass)
{
	return ObjectClass->GetDefaultObject();
}

```

Then you can access the default properties in graph just like normal properties. Be careful not to modify them though, I suspect bad things would happen.

---

<div class="post-metadata">

**Author:** ![Ixiguis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ixiguis](https://forums.unrealengine.com/u/Ixiguis)\
**Post date:** [March 30, 2014, 5:51pm UTC](https://forums.unrealengine.com/t/question-bp-accessing-default-values-of-a-variables/276806/10 "2014-03-30T17:51:02Z")

</div>

Nice, thanks for sharing!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a1d09d07](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a1d09d07](https://forums.unrealengine.com/u/anonymous_user_a1d09d07)\
**Post date:** [July 28, 2015, 7:42pm UTC](https://forums.unrealengine.com/t/question-bp-accessing-default-values-of-a-variables/276806/11 "2015-07-28T19:42:26Z")

</div>

Soooo I need to do this as well. A year later, has this been added? I couldn’t find any documentation on it.

---

<div class="post-metadata">

**Author:** ![Ixiguis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ixiguis](https://forums.unrealengine.com/u/Ixiguis)\
**Post date:** [July 28, 2015, 7:51pm UTC](https://forums.unrealengine.com/t/question-bp-accessing-default-values-of-a-variables/276806/12 "2015-07-28T19:51:02Z")

</div>

It will be in 4.9:

Get Class Defaults node gives access to Blueprints’ values without having to create an instance

---

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [September 8, 2015, 11:12pm UTC](https://forums.unrealengine.com/t/question-bp-accessing-default-values-of-a-variables/276806/13 "2015-09-08T23:12:00Z")

</div>

Sadly it doesn’t show many types of variables, such as SkeletalMesh, Material, etc: [New 4.9 Get Class Defaults node doesn't have all the variables - Programming & Scripting - Unreal Engine Forums](https://answers.unrealengine.com/questions/294533/new-49-get-class-defaults-node-doesnt-have-all-the.html)
