依旧不对 引入就报错
时间: 2024-02-15 21:03:22 浏览: 22
非常抱歉,我的回答还是有误。在 UE5 中,`RuntimeAssetCache.h` 文件位于 `Engine/Plugins/Runtime/AssetCache/Source/Runtime/AssetCache/Public` 目录下,因此你应该使用以下方式包含它:
```cpp
#include "Runtime/AssetCache/Public/RuntimeAssetCache.h"
```
如果你想在插件中使用 `FRuntimeAssetCache` 类,则需要在插件的代码中包含以下头文件:
```cpp
#include "CoreMinimal.h"
#include "UObject/Object.h"
#include "Runtime/AssetCache/Public/RuntimeAssetCache.h"
```
同时,在插件的 `.uplugin` 文件中,需要声明依赖项 `AssetCache` 模块,以便在使用插件时自动包含该模块:
```json
{
"Modules": [
{
"Name": "YourPluginName",
"Type": "Runtime",
"LoadingPhase": "Default",
"AdditionalDependencies": [
"AssetCache"
]
}
]
}
```
请注意,如果你的插件是开发中的非正式版本,则需要在 `AdditionalDependencies` 中添加 `AssetCacheEditor` 模块,以便在编辑器中使用该插件。
再次感谢你的耐心,希望这次回答能够帮到你。