When BlueprintGetter / BlueprintSetter specifiers are used for a property, the increment/decrement nodes in blueprints will call the BluprintGetter function but not the BlueprintSetter function. This results in the increment/decrement not affecting the property value.
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = test, BlueprintGetter=GetMyValue, BlueprintSetter=SetMyValue) float MyValue; UFUNCTION(BlueprintGetter, Category = Test) float GetMyValue() const; UFUNCTION(BlueprintSetter, Category = Test) void SetMyValue(float SetValue);
void AMyActor::SetMyValue(float SetValue) { MyValue = SetValue; if (GEngine) { GEngine->AddOnScreenDebugMessage(-1, 4.f, FColor::MakeRandomColor(), TEXT("On Set Text")); } } float AMyActor::GetMyValue() const { if (GEngine) { GEngine->AddOnScreenDebugMessage(-1, 4.f, FColor::MakeRandomColor(), TEXT("On Get Text")); } return MyValue; }
Result:
"On Get Text" is printed twice (once for increment node, once for print string node), but the "On Set Text" is not printed. The value printed by PrintString node is 100, indicating the increment did not update the property.
Expected:
Calling increment node from Getter node updates the value returned by Getter
i have this problem UE4CC-Windows-58DC12AF4B97F057BD108FBFF569B2E9_0000
UE-81742 DXGI_ERROR_INVALID_CALL
I am not able to find world outliner how to enable it?
An error occurred while trying to generate project files !?
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
Delay nodes occasionally don't fire the "Completed" output in a nativized build
How can i modify the param name in EQS node
Why does the REMOVE method of map container remove elements have memory leaks?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-51817 in the post.
1 |
Component | UE - Gameplay - Blueprint |
---|---|
Affects Versions | 4.17.2, 4.18 |
Created | Oct 31, 2017 |
---|---|
Resolved | Aug 18, 2021 |
Updated | Aug 18, 2021 |