If an object containing a struct is instanced inline inside ActorComponent, the properties of the struct cannot be edited. This only happens if the ActorComponent is added to a class by using CreateDefaultSubobject in a code constructor. If the ActorComponent is added through the Blueprint Editor, the property can be edited.
USTRUCT(BlueprintType) struct FGAAttributeBase { GENERATED_USTRUCT_BODY() public: UPROPERTY() FName AttributeName; UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Value") float BaseValue; }; /** * */ UCLASS(BlueprintType, Blueprintable, DefaultToInstanced, EditInlineNew) class TESTSTRUCTBUG1_API UARCharacterAttributes : public UObject { GENERATED_BODY() public: UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Resources") FGAAttributeBase Health; };
UPROPERTY(EditAnywhere, BlueprintReadOnly, Instanced, Replicated)
class UARCharacterAttributes* DefaultAttributes;
void UTestActorComponent::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
}
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true")) class UTestActorComponent* TestComponent;
RESULT:
The value of the Health property cannot be edited.
EXPECTED:
The value of the Health property can be edited.
I am not able to find world outliner how to enable it?
How can i modify the param name in EQS node
Installer 4.10 failed with error code R-1603
Delay nodes occasionally don't fire the "Completed" output in a nativized build
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
Head over to the existing Questions & Answers thread and let us know what's up.