GenericGraph icon indicating copy to clipboard operation
GenericGraph copied to clipboard

Question: Curious why the graphs are not derived from UDataAsset but rather UObject ?

Open jswigart opened this issue 4 years ago • 1 comments

Quick question. I'm curious why the graphs are UObject and not UDataAsset derived?

jswigart avatar Aug 04 '20 04:08 jswigart

This would be pretty helpful. A backwards compatible approach I've found is to create a UPrimaryDataAsset which references the UObject derived UGenericGraph as a TSoftObjectPtr, and override PostEditChangeProperty in UPrimaryDataAssets to traverse the graph and read values (or rarely, make writes to the graph but this brittle). This approach allows for integration with AssetRegistrySearchable UPROPERTYs and loading the graphs on-demand instead of needing the hard link and always keeping them in memory.

If there's any appetite for it, I can make a pr with a UGenericGraphPrimaryDataAsset

BirdCatcherGames avatar May 30 '22 17:05 BirdCatcherGames