How to create an Editor Utility Widget that can edit a DataAsset's ReadOnly properties?

I am trying to create a little helper tool for my Data Assets. I realized I can use Editor Utility Widgets for that, but it opened up the problem that I can not access my BlueprintReadOnly (and at the same time also EditDefaultsOnly) properties. I do not want to be able to edit these properties of my Data Assets elsewhere in UMG so this should stay that way. Here is the property declaration:

	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, meta=(AllowPrivateAccess = "true"))
	float ProductionPerDay;

When trying to edit these, I get an “Cannot write to const” error both in UMG and in Editor Utility Widgets.

How can I edit them in an Editor Utility Widget without making them Writable in all BluePrints - which should not be allowed for these Data Assets?

After searching and asking around for a long time I coincidentally found the “Get Editor Property” and “Set Editor Property” node which does what I need. It takes data Assets and allows to get and set properties by accessing them via name.

The only downside is that it requires you to enter the property name by string, so if you rename them you need to adjust them manually, but I prefer this over modifying the read/write access of a property.

1 Like

Hi, do you happen to know how to Get/Set a property that is an array?

Nvm, I assumed the wildcard output pin was single variable-only. Just connecting it to some array pin turns it to an array pin.