Since UE5.0, cannot edit double variables in property matrix. In UE4.27, it worked correctly and could be edited from the property matrix. This is because double variables are not supported in SPropertyEditorTableRow::ConstructPropertyEditorWidget. Until UE4.27, the float of Blueprint Variable was treated as a "float", but since UE5.0, it is treated as a "double" internally. Therefore, "float variable parameter" cannot be edited. It is allowed by applying the following workaround.
Workaround:
TSharedRef<SWidget> SPropertyEditorTableRow::ConstructPropertyEditorWidget() { //... // ORDER MATTERS: first widget type to support the property node wins! if ( SPropertyEditorNumeric<float>::Supports(PropertyEditorRef) ) { TSharedRef<SPropertyEditorNumeric<float>> TempWidget = SAssignNew(PropertyWidget, SPropertyEditorNumeric<float>, PropertyEditorRef ); TempWidget->GetDesiredWidth(MinDesiredWidth, MaxDesiredWidth); } //add start else if (SPropertyEditorNumeric<double>::Supports(PropertyEditorRef)) { TSharedRef<SPropertyEditorNumeric<double>> TempWidget = SAssignNew(PropertyWidget, SPropertyEditorNumeric<double>, PropertyEditorRef); TempWidget->GetDesiredWidth(MinDesiredWidth, MaxDesiredWidth); } //add end } TSharedRef<SWidget> FTextPropertyTableCellPresenter::ConstructEditModeCellWidget() { // ... // ORDER MATTERS: first widget type to support the property node wins! if ( SPropertyEditorNumeric<float>::Supports(PropertyEditor) ) { PropertyWidget = SNew( SPropertyEditorNumeric<float>, PropertyEditor ) .Font( Font ); } // add start else if (SPropertyEditorNumeric<double>::Supports(PropertyEditor)) { PropertyWidget = SNew(SPropertyEditorNumeric<double>, PropertyEditor) .Font(Font); } // add end } bool FTextPropertyTableCellPresenter::CalculateIfUsingReadOnlyEditingWidget() const { //... // ORDER MATTERS: first widget type to support the property node wins! if (SPropertyEditorNumeric<float>::Supports(PropertyEditor) || //add start SPropertyEditorNumeric<double>::Supports(PropertyEditor) || //add end }
Then, can't allow to edit float variable parameter
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-196901 in the post.
3 |
Component | UE - Editor - Workflow Systems |
---|---|
Affects Versions | 5.1, 5.2, 5.3 |
Created | Oct 2, 2023 |
---|---|
Updated | Jan 19, 2024 |