SoftObjectPtr gets garbage collected, Best ways to keep alive

Somewhat related to AlienRenders suggestion that you turn your asset into a PrimaryAsset (since that’s not always a possibility) would be using the StreamableManager.

Using the AssetManager you can get at the StreamableManager (UAssetManager::GetStreamableManager()). The StreamabaleManager has functions for doing asynchronous loads (RequestAsyncLoad) as well as synchronous loads (RequestSyncLoad). The useful part is that both of these functions return an FStreamableHandle that for as long as you keep it valid, the thing you loaded will stay loaded. When you don’t need the resource anymore you just reset it and it will unload eventually.

That may not sound that much better than just assigning the results of LoadSynchronous to your own property and for one property it might not be. Where it really starts to shine is that both of the loading functions have versions that take arrays and still return a single handle. So you can request a bunch of assets of different types and keep them loaded with a single member.

Another option if your soft pointer is on a primary asset instead of referring to one, would be the use of AssetBundles. This would allow you to request the loading of soft references (using the Asset Manager) that have some UPROPERTY markup. Similar to LoadPrimaryAsset, the AssetManager would keep those resources loaded for you until you unloaded the asset bundle.