# EditFixedSize - Can't update size in created BP

**URL:** <https://forums.unrealengine.com/t/editfixedsize-cant-update-size-in-created-bp/316692>\
**Category:** Blueprint\
**Tags:** unreal-engine, bug-report, Blueprint, question\
**Created:** [April 28, 2015, 11:06am UTC](https://forums.unrealengine.com/t/editfixedsize-cant-update-size-in-created-bp/316692 "2015-04-28T11:06:42Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elvince](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Elvince](https://forums.unrealengine.com/u/Elvince)\
**Post date:** [April 28, 2015, 11:06am UTC](https://forums.unrealengine.com/t/editfixedsize-cant-update-size-in-created-bp/316692/1 "2015-04-28T11:06:42Z")

</div>

Hi,

when settings EditFixedSize, we just want the user to not edit the array size that we planned to set in C++.

But, as of today, if I set an array of 2 elements with EditFixedSize.  
Create a BP on it  
Change the C++ to add a 3rd element  
Open the BP =\> 2 element and you can’t get the third one.

Are you able to repro this?

Thanks,

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [April 28, 2015, 2:52pm UTC](https://forums.unrealengine.com/t/editfixedsize-cant-update-size-in-created-bp/316692/2 "2015-04-28T14:52:38Z")

</div>

Hey -

Can you elaborate on what’s happening? It sounds like the size of the array is not updating in the blueprint when it is updated in the code, is that correct? If you create a new blueprint after updating the code does it have 2 or 3 elements? How are you using EditFizedSize? Can you post a code snippet to show how you have your class setup?

Cheers

---

<div class="post-metadata">

**Author:** ![Elvince](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Elvince](https://forums.unrealengine.com/u/Elvince)\
**Post date:** [April 29, 2015, 11:52am UTC](https://forums.unrealengine.com/t/editfixedsize-cant-update-size-in-created-bp/316692/3 "2015-04-29T11:52:52Z")

</div>

Hi,

You are right, the array size is not updated in the BP when the C++ is updated.

If I create a new BP after the C++ change it reflects the correct size.

here is a snippet:

```
UPROPERTY(Instanced, EditAnywhere, EditFixedSize,BlueprintReadWrite, Category = "Test") 
	TArray< class UMyClass* > MyArray;

```

In the C++ Constructor, you can use to add default element:  
MyArray.Add(MyClassInstance);

Once you BP is setup, you just add another line of:  
MyArray.Add(MyClassInstance);

I hope this is enough for you to repro the issue.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [April 29, 2015, 2:53pm UTC](https://forums.unrealengine.com/t/editfixedsize-cant-update-size-in-created-bp/316692/4 "2015-04-29T14:53:46Z")

</div>

Hey -

I’m not seeing the same behavior. When I copied your code into a class I had to add “” after TArray to get it to compile, but when I created a blueprint of my class the blueprint and instance of the blueprint in the viewport would update each time I added a new element in the constructor.

---

<div class="post-metadata">

**Author:** ![Elvince](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Elvince](https://forums.unrealengine.com/u/Elvince)\
**Post date:** [April 29, 2015, 3:28pm UTC](https://forums.unrealengine.com/t/editfixedsize-cant-update-size-in-created-bp/316692/5 "2015-04-29T15:28:38Z")

</div>

Hi,

I updated my comment so everything appears as I wrote it. the output that you were seing was not exactly what I wrote.

In all case, could you please share with me the property that you set in C++ so I can understand the differences if there are some and test it on my side?

Does the Array that you used had one element before the BP was created or was it empty?

thanks,

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [April 29, 2015, 6:54pm UTC](https://forums.unrealengine.com/t/editfixedsize-cant-update-size-in-created-bp/316692/6 "2015-04-29T18:54:27Z")

</div>

I created 2 classes based on Actor (ActorArray and MyActor). In MyActor I created the following TArry:

```
UPROPERTY(Instanced, EditAnywhere, EditFixedSize, BlueprintReadWrite, Category = "Test")
		TArray< class AActorArray* > MyArray;

```

and the following AActorArray pointer:

```
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Things")
		AActorArray* what;

```

In the constructor for MyActor I then added an element to the array:

```
MyArray.Add(what);

```

After compiling the code I created a blueprint based on MyActor and added an instance to the viewport. At this point I could see the one element of the array in the details panel. Back in the constructor of MyActor I added a second element to the array and compiled again which triggered a hot reload in the editor. After the hot reload the instance of the BP in the viewport showed 2 elements.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [May 4, 2015, 6:07pm UTC](https://forums.unrealengine.com/t/editfixedsize-cant-update-size-in-created-bp/316692/7 "2015-05-04T18:07:18Z")

</div>

Hey -

I’ve not heard back on if the sample code I provided was able to help you with setting up your array. I will be marking this post as resolved for tracking purposes however if you’re still having problems seeing new elements of an array after compile please feel free to comment on this post and we will investigate further.

Cheers

---

<div class="post-metadata">

**Author:** ![Elvince](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Elvince](https://forums.unrealengine.com/u/Elvince)\
**Post date:** [May 5, 2015, 10:15am UTC](https://forums.unrealengine.com/t/editfixedsize-cant-update-size-in-created-bp/316692/8 "2015-05-05T10:15:09Z")

</div>

Sorry for the late answer on this.

```
 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Things")
         AActorArray* what;

```

I’m not sure to follow why you set UPROPERTY. I don’t need to hold the reference to my InstancedClass as they are in the Array.

The way I’m doing this:  
In the contructor:

```
UMyClass* classInst= ObjectInitializer.CreateDefaultSubobject<UMyClass>(this,TEXT("MyObject"));
MyArray.Add(classInst);
classInst= ObjectInitializer.CreateDefaultSubobject<UMyClass>(this,TEXT("MyObject2"));
MyArray.Add(classInst);

```

I hope this help to repro the bug.  
More, my element in my Array are not Actor but Object, this is something to look if this is not link to it.

Thanks,

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [May 5, 2015, 3:47pm UTC](https://forums.unrealengine.com/t/editfixedsize-cant-update-size-in-created-bp/316692/9 "2015-05-05T15:47:53Z")

</div>

Hey -

Using an object instead of an actor I did see some inconsistency with the size of the array updating after a hot reload. I have bugged this behavior (UE-14992) for further investigation. In the cases where the array did not update I found that creating a new instance of the blueprint after the hot reload would show the correct number of elements. setting the UObject\* as a UPROPERTY() I also found reduced the frequency of the inconsistency occurring.

---

<div class="post-metadata">

**Author:** ![Elvince](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Elvince](https://forums.unrealengine.com/u/Elvince)\
**Post date:** [May 5, 2015, 3:50pm UTC](https://forums.unrealengine.com/t/editfixedsize-cant-update-size-in-created-bp/316692/10 "2015-05-05T15:50:15Z")

</div>

ok great that you have been able to reproduce it.  
If I remember properly, I think the issue is also when reloading the editor and not just hot reload

---

<div class="post-metadata">

**Author:** ![Elvince](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Elvince](https://forums.unrealengine.com/u/Elvince)\
**Post date:** [October 27, 2015, 1:29pm UTC](https://forums.unrealengine.com/t/editfixedsize-cant-update-size-in-created-bp/316692/11 "2015-10-27T13:29:09Z")

</div>

Hi,

any update on this?

thanks,

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [October 27, 2015, 2:28pm UTC](https://forums.unrealengine.com/t/editfixedsize-cant-update-size-in-created-bp/316692/12 "2015-10-27T14:28:58Z")

</div>

Hey -

I tested adding array elements in 4.9.2 and my blueprint instance updated with each addition. Let me know if you’re still seeing this in the latest engine version and what you’re doing in code/editor.

---

<div class="post-metadata">

**Author:** ![Elvince](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Elvince](https://forums.unrealengine.com/u/Elvince)\
**Post date:** [October 27, 2015, 2:47pm UTC](https://forums.unrealengine.com/t/editfixedsize-cant-update-size-in-created-bp/316692/13 "2015-10-27T14:47:36Z")

</div>

Good News. thanks for the update. I will reuse this in my code as it is fixed.
