I have a bunch of data assets that represents each item in the game, each data asset has an Actor class that represents the physical item in the game.
The item actor has an Asset data reference so I can retrieve various default info for it like icon, price etc.
Since I’ll have hundreds of these in items in the game I’d like to find a way to just go through all the data assets, get its actor class and assign the Data asset reference to it automatically in editor.
I tried creating a widget utility blueprint but when I try to use SetByReference I get the error “Cannot write to const”
I have also tried to use the SetEditorProperty() but it always says there was no variable named ItemData found.
Is there a way to edit those values in an automated way?
Also it says the variable is const, but I didn’t set it that way, in fact it’s BlueprintReadWrite atm (should be read only preferably)
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = “Default”)
UItemDataAsset* ItemData;
Below you can see my various attempts
EDIT: I have also tried to use set_editor_property in python but I still get the error of the property not existing
EDIT2: I tried Python aswell, no luck
Any ideas?