Hello guys,
I’ll try to summarize my problem as much as I can, I have two assets:
MyDataAsset (derived from a c++ class inheriting UDataAsset).
and
MyActorComponent (derived from a c++ class inheriting UActorComponent).
inside MyActorComponent I have two UPROPERTY:
MyDataAsset* DataAssetConfig
and
FString DataAssetName
and inside MyDataAsset I have also two UPROPERTY:
FPath FilePath //to get a file from my disk.
and
FString FileName //that extracts the name of the selected file.
The idea is when I choose an asset for DataAssetConfig in MyActorComponent, the FString DataAssetName should automatically reflect the name of the FileName from MyDataAsset.
Now if I change the path from FilePath the FileName is changing accordingly, and it’s sending a signal to all MyActorComponent that are referencing this MyDataAsset to change their variable DataAssetName.
This is working as expected, except when I first open the editor, if I make any changes to the DataAsset FilePath the DataAssetName does not visually reflect the change although internally it does update to the new name.
To be able to see the changes visually I need to click on any settings in the ActorComponent detail panel, only after that when I made changes to the FilePath the DataAssetName reflect the changes visually and of course internally.
I think before touching the ActorComponent Detail panel, the editor does not register the panel for any visual changes or maybe something else, but I tried to force the change in multiple ways but with no luck.
So if any of you guys have any idea I’ll be thankful.
cheers.