Description

When a Actor Blueprint is placed in the world with a TArray of instanced UObjects, the + button to add a new instance of the object wont create a instance of the object.

Steps to Reproduce
  1. Create new C++ empty project
  2. Create UObject inherited class with following code:
    #pragma once
    
    #include "Object.h"
    #include "DeadObject.generated.h"
    
    /**
    *
    */
    UCLASS(BlueprintType, EditInlineNew)
    class AH454593_API UDeadObject : public UObject
    {
    	GENERATED_BODY()
    
    public:
    	UDeadObject();
    
    	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "DeadObject")
    	int TestValOne;
    
    	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "DeadObject")
    	float TestValTwo;
    
    };
    
  3. Create ActorComponent inherited class with the following code:
    #pragma once
    
    #include "Components/ActorComponent.h"
    #include "DeadComponent.generated.h"
    
    UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
    class AH454593_API UDeadComponent : public UActorComponent
    {
    	GENERATED_BODY()
    
    public:	
    	// Sets default values for this component's properties
    	UDeadComponent();
    
    	// Called when the game starts
    	virtual void BeginPlay() override;
    	
    	// Called every frame
    	virtual void TickComponent( float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction ) override;
    	
    	UPROPERTY( EditAnywhere, BlueprintReadWrite, Instanced, Category = "UDead Objects" )
    	TArray<class UDeadObject*> DeadObjects;	
    };
    
  4. Compile project.
  5. Create Blueprint class in editor, from Actor.
  6. Add "Dead" Component to Actor Blueprint.
  7. Place Blueprint into level and select the "Dead" component from the Component details panel.
  8. Under "UDead Objects", press + button to add to "Dead Objects"

RESULT:

Pressing the + button for an instanced object TArray wont add any elements.

EXPECTED:

Pressing the + button adds to the TArray of instanced objects.

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

5
Login to Vote

Duplicate
ComponentUE - Gameplay - Blueprint
Affects Versions4.12.5
Target Fix4.16
CreatedAug 9, 2016
ResolvedMar 27, 2017
UpdatedMar 27, 2017
View Jira Issue