vault backup: 2024-10-12 17:19:45

This commit is contained in:
2024-10-12 17:19:46 +08:00
parent ff94ddca61
commit 244c0c52f6
960 changed files with 31348 additions and 10 deletions

View File

@@ -0,0 +1,34 @@
# Interface
- **功能描述:** 标识这个Class是个Interface。
- **引擎模块:** UHT
- **元数据类型:** bool
- **作用机制:** 在ClassFlags中添加[CLASS_Interface](../../../Flags/EClassFlags/CLASS_Interface.md)
- **常用程度:** 0
标识这个Class是个Interface。
只用在NoExportTypes.h中我们自己的UInterface不需要手动设置。
是UHT在为UInterface生成的时候设置在.generated.h里的。
## 源码例子:
```cpp
UCLASS(abstract, noexport, intrinsic, interface, Config = Engine)
class UInterface : public UObject
{}
```
## 原理:
```cpp
bool FKismetEditorUtilities::IsClassABlueprintInterface(const UClass* Class)
{
if (Class->HasAnyClassFlags(CLASS_Interface) && !Class->HasAnyClassFlags(CLASS_NewerVersionExists))
{
return true;
}
return false;
}
```