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.
How does TextureRenderTarget2D get TArray<uint8> type data?
Why does the REMOVE method of map container remove elements have memory leaks?
How to delete some elements correctly when deleting an array loop?
UMG RichText not appear image when packaged
What is the difference between Camera and CineCamera?
What controls of umg have mouse wheel events in UE4.27?
Why does UV setting float2(1,1) display incorrectly in the material's custom node?
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 |