Async loading assets directly to a hard reference?
So I read about TSoftObjectPtr and FStreamableManager for async loading.
Those work great but the thing is the requresting a async load gives you a weak pointer to the object which you then need to assign to a hard reference.
The issue with that is you need to maintain two variables for each asset you want to load using FStreamableManager one is the TSoftObjectPtr and the second being a hard reference (UProperty, shared ptr etc) to the object.
Is there a way to get a hard reference on the TSoftObjectPtr itself after you've loaded it?
I've read about SimpleAsyncLoad but that makes a permanent hard reference and needs manual unloading which leaves plenty room for resource leaks.
I wish to load supporting assets in the begin play and then have them automatically unload as it goes out of scope or is destroyed but without the need to maintain two different variables for each asset.
asked Aug 04 '18 at 10:25 AM in C++ Programming
Yes LoadSynchronous function will only load when needed
but most impolitely TSoftObjectPtr has operator overloads for * and -> and they return main object, so TSoftObjectPtr it self behaves like pointer
Follow this question
Once you sign in you will be able to subscribe for any updates here