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.
#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; };
#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; };
RESULT:
Pressing the + button for an instanced object TArray wont add any elements.
EXPECTED:
Pressing the + button adds to the TArray of instanced objects.
Head over to the existing Questions & Answers thread and let us know what's up.
5 |
Component | UE - Gameplay - Blueprint |
---|---|
Affects Versions | 4.12.5 |
Target Fix | 4.16 |
Created | Aug 9, 2016 |
---|---|
Resolved | Mar 27, 2017 |
Updated | Mar 27, 2017 |