MTPResourceLoadManage
接口
MTPThreadInterface
添加头文件:
#include "Engine/StreamableManager.h"
cpp
class IStreamableContainer
{
public:
virtual ~IStreamableContainer(){}
//异步
//存储路径
IStreamableContainer& operator>>(const TArray<FSoftObjectPath>& InObjectPath)
{
SetObjectPath(InObjectPath);
return *this;
}
//完成异步后,执行代理
TSharedPtr<struct FStreamableHandle> operator>>(const FSimpleDelegate& ThreadDelegate)
{
return GetStreamableManager()->RequestAsyncLoad(GetObjectPath(), ThreadDelegate);
}
//同步加载
//执行后主线程阻塞,异步加载,获得handle,调用资源
TSharedPtr<struct FStreamableHandle> operator<<(const TArray<FSoftObjectPath>& InObjectP