# Editing this value in a Class Default Object not allowed?

**URL:** <https://forums.unrealengine.com/t/editing-this-value-in-a-class-default-object-not-allowed/430521>\
**Category:** World Creation\
**Tags:** actor, UE4-17, unreal-engine, level-blueprint, question\
**Created:** [July 29, 2018, 5:53pm UTC](https://forums.unrealengine.com/t/editing-this-value-in-a-class-default-object-not-allowed/430521 "2018-07-29T17:53:48Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![tanmayb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tanmayb](https://forums.unrealengine.com/u/tanmayb)\
**Post date:** [July 29, 2018, 5:53pm UTC](https://forums.unrealengine.com/t/editing-this-value-in-a-class-default-object-not-allowed/430521/1 "2018-07-29T17:53:48Z")

</div>

I ported my game from 4.17 to 4.20, and a core functionality broke. I had an array of actors of a class “PuzzleBlockGrid” in my level blueprint. This worked in 4.17, but in 4.20, although the previously set array elements have stayed, I can’t add more actors; the new elements stubbornly remain blank. The dropdown and pick tool are greyed out, and mouseover shows this: “Editing this value in a Class Default Object not allowed?”

 ![248869-picture2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/0/6/106a63f60fd5c9e3a78fe985dd72ba5c7630ed5f.jpeg)

I also tested with a single valued variable, and it’s the same.

Is this a bug, or deliberate, and if yes, what’s the recommended way now in 4.20?

---

<div class="post-metadata">

**Author:** ![tanmayb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tanmayb](https://forums.unrealengine.com/u/tanmayb)\
**Post date:** [July 30, 2018, 7:30pm UTC](https://forums.unrealengine.com/t/editing-this-value-in-a-class-default-object-not-allowed/430521/2 "2018-07-30T19:30:57Z")

</div>

Here are the things I tried:

1. Make a new **array** in the same level for the same actor BP. Didn’t work.
2. Make a new array in the same level for a **different** test actor BP. Nope.
3. Make a new **project** , a new array in the level and a new test actor BP. Still the same.

I’m not sure what I’m missing. Does it work for other people? It should be right? A friend of mine also has the exact same issue, which was actually where I noticed it first.

Is this a bug?

---

<div class="post-metadata">

**Author:** ![iamshaneihaveaface](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@iamshaneihaveaface](https://forums.unrealengine.com/u/iamshaneihaveaface)\
**Post date:** [August 21, 2018, 3:17pm UTC](https://forums.unrealengine.com/t/editing-this-value-in-a-class-default-object-not-allowed/430521/3 "2018-08-21T15:17:35Z")

</div>

This is also happening to us on 4.20.1. I think it was an oversight to this issue:

> **[The Unreal Engine Issues and Bug Tracker](https://issues.unrealengine.com/issue/UE-60132)**
>
> Welcome to the Unreal Engine Issue and Bug Tracker. You can check the status of an issue and search for existing bugs. See latest bug fixes too.

---

<div class="post-metadata">

**Author:** ![sclark39](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sclark39](https://forums.unrealengine.com/u/sclark39)\
**Post date:** [August 21, 2018, 3:28pm UTC](https://forums.unrealengine.com/t/editing-this-value-in-a-class-default-object-not-allowed/430521/4 "2018-08-21T15:28:43Z")

</div>

UE-60132 claims this is by design:

> Going forward with 4.20 you will only  
> be able to set actor references on an  
> instance of a Blueprint in a level,  
> but not in the class defaults of a  
> Blueprint.

…but it seems like this must be an oversight, since there’s no instance to edit way to edit in the level, for level blueprints.

Similar question, for level blueprints specifically: [No editable arrays in 4.20? - Editor Scripting - Epic Developer Community Forums](https://answers.unrealengine.com/questions/810267/view.html)

---

<div class="post-metadata">

**Author:** ![tanmayb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tanmayb](https://forums.unrealengine.com/u/tanmayb)\
**Post date:** [August 23, 2018, 2:10pm UTC](https://forums.unrealengine.com/t/editing-this-value-in-a-class-default-object-not-allowed/430521/5 "2018-08-23T14:10:24Z")

</div>

So the only to do that now is to makeArray on BeingPlay? (as also pointed out in the linked answer above)

---

<div class="post-metadata">

**Author:** ![sclark39](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sclark39](https://forums.unrealengine.com/u/sclark39)\
**Post date:** [August 23, 2018, 3:33pm UTC](https://forums.unrealengine.com/t/editing-this-value-in-a-class-default-object-not-allowed/430521/6 "2018-08-23T15:33:13Z")

</div>

Yes, if you want the array in the level blueprint itself set…  
Or you could potentially create a proxy actor to place in the world and add an array variable to that instead. That way the interface would be similar for setting up the references, and in the level blueprint you’d just pull the variables off that actor instance instead of from the level blueprint’s variables.

---

<div class="post-metadata">

**Author:** ![Burgess](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Burgess](https://forums.unrealengine.com/u/Burgess)\
**Post date:** [October 7, 2018, 3:05pm UTC](https://forums.unrealengine.com/t/editing-this-value-in-a-class-default-object-not-allowed/430521/7 "2018-10-07T15:05:09Z")

</div>

Make both blueprints child class.

---

<div class="post-metadata">

**Author:** ![somenzguy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@somenzguy](https://forums.unrealengine.com/u/somenzguy)\
**Post date:** [October 11, 2018, 8:29pm UTC](https://forums.unrealengine.com/t/editing-this-value-in-a-class-default-object-not-allowed/430521/8 "2018-10-11T20:29:27Z")

</div>

Your variable type is object, it needs to be class. Object means an instance, but since a Blueprint is a class an not yet an instance, it can’t reference objects, only other classes.

Set it to Class Reference, recompile and you should be able to define the array now

 ![256263-unrealpawnclass.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/5/8/058b06da67f502996c7ff37bb0b3b5ef323bf564.png)

---

<div class="post-metadata">

**Author:** ![sclark39](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sclark39](https://forums.unrealengine.com/u/sclark39)\
**Post date:** [October 11, 2018, 10:43pm UTC](https://forums.unrealengine.com/t/editing-this-value-in-a-class-default-object-not-allowed/430521/9 "2018-10-11T22:43:10Z")

</div>

This does not accomplish the desired outcome. The issue is that this is not just any class blueprint, it’s a level blueprint. Since there is no instance of the class in editor to click on, this is like having both the class and instance all in one. Effectively a blueprint singleton. And since there is no instance of the class in the editor to edit, the only way to edit these values is on the class defaults which, prior to UE 4.20, worked fine.

---

<div class="post-metadata">

**Author:** ![Burgess](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Burgess](https://forums.unrealengine.com/u/Burgess)\
**Post date:** [October 12, 2018, 4:06pm UTC](https://forums.unrealengine.com/t/editing-this-value-in-a-class-default-object-not-allowed/430521/10 "2018-10-12T16:06:44Z")

</div>

After having made the child class of my blueprints, all worked well; until today. I added a second instance of the child class BP to my level and it would not allow any reference to be made (editing this value) to the variable that is set to type object (a specific BP). After working with this for a few hours, I changed the variable type to soft object and that seems to have solved the problem. I did have to edit the existing blueprints to re-link the variables in my scripts and UE4 automatically added a conversion node to convert the reference from a soft object to a regular object.

At the moment, all is working as expected for my level. This is simple direct blueprint communications; one blueprint getting a reference to another.

---

<div class="post-metadata">

**Author:** ![somenzguy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@somenzguy](https://forums.unrealengine.com/u/somenzguy)\
**Post date:** [October 15, 2018, 8:25pm UTC](https://forums.unrealengine.com/t/editing-this-value-in-a-class-default-object-not-allowed/430521/11 "2018-10-15T20:25:03Z")

</div>

I tested the Level Blueprint, it works as I described. If the OP tanmayb changed the variable type to a class type, they might lose the populated fields, but it seems like they will be able to repopulate them.

 ![256669-unrealobjectvsclass.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/d/4/5d4923c694d5157c8aa3d03bf0b33033000dad31.png)

---

<div class="post-metadata">

**Author:** ![sclark39](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sclark39](https://forums.unrealengine.com/u/sclark39)\
**Post date:** [October 15, 2018, 9:46pm UTC](https://forums.unrealengine.com/t/editing-this-value-in-a-class-default-object-not-allowed/430521/12 "2018-10-15T21:46:22Z")

</div>

Yes, it is editable… but it is not accomplishing the same thing. The intention is to be able to populate the array with references to instances that exist in the level, not the type of class they are.

---

<div class="post-metadata">

**Author:** ![sclark39](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sclark39](https://forums.unrealengine.com/u/sclark39)\
**Post date:** [October 15, 2018, 9:52pm UTC](https://forums.unrealengine.com/t/editing-this-value-in-a-class-default-object-not-allowed/430521/13 "2018-10-15T21:52:20Z")

</div>

This seems like it must be the intended way to do this now. I am upvoting this answer.

I believe with this you will need to be careful to not use the reference too soon after streaming in the level, if it is a streamed level. The reference may be invalid if used in BeginPlay.

---

<div class="post-metadata">

**Author:** ![somenzguy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@somenzguy](https://forums.unrealengine.com/u/somenzguy)\
**Post date:** [October 16, 2018, 1:13am UTC](https://forums.unrealengine.com/t/editing-this-value-in-a-class-default-object-not-allowed/430521/14 "2018-10-16T01:13:11Z")

</div>

Oh I thought the OP was after classes, not instances. Yeah I guess that doesn’t work then

---

<div class="post-metadata">

**Author:** ![sclark39](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sclark39](https://forums.unrealengine.com/u/sclark39)\
**Post date:** [November 14, 2018, 8:50pm UTC](https://forums.unrealengine.com/t/editing-this-value-in-a-class-default-object-not-allowed/430521/15 "2018-11-14T20:50:52Z")

</div>

**Warning!!! Using Soft References can actually cause issues when playing from editor!** (UE 4.20.3)

The soft reference apparently can link to the “editor world” version of an actor instead of the “pie world” version. We ran into this when trying to call UGameplayStatics::GetPlayerPawn( GetWorld(), 0 ) from the soft referenced actor. GetWorld returned was the Editor version, so no PlayerPawn could be found!

---

<div class="post-metadata">

**Author:** ![Burgess](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Burgess](https://forums.unrealengine.com/u/Burgess)\
**Post date:** [November 15, 2018, 9:24pm UTC](https://forums.unrealengine.com/t/editing-this-value-in-a-class-default-object-not-allowed/430521/16 "2018-11-15T21:24:19Z")

</div>

Wow, thanks for the head’s up. I have moved on to other things at the moment but I will be sure to address this when I get back to that part of my project.

Thanks again for your insight.

---

<div class="post-metadata">

**Author:** ![AyushmanYiya1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AyushmanYiya1](https://forums.unrealengine.com/u/AyushmanYiya1)\
**Post date:** [May 31, 2024, 3:12am UTC](https://forums.unrealengine.com/t/editing-this-value-in-a-class-default-object-not-allowed/430521/17 "2024-05-31T03:12:11Z")

</div>

Make sure you check this box.  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/b/c/9bc8c6083e906a24ef3737a73f772e44f65c112b.png)
