2023-06-29 11:55:02 +08:00

27 lines
992 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 参考案例
https://www.bilibili.com/video/BV1tp4y1r7A7
Engine/Source/Runtime/LinvLinkInterface
## 添加数据类型
>在Roles文件夹中得到XXXType.h与XXXRole.h中增加自定义数据类型与Roles规则。
- FLiveLinkBaseStaticData静态变量
- FLiveLinkBaseFrameData每帧变量
- FLiveLinkBaseBlueprintData:蓝图数据,用于在蓝图中访问对应的数据。
## 添加规则
- GetDisplayName():定义自己的LiveLink名称。必须定义且唯一。
- GetXXXDataStruct():返回XXXType.h中定义的结构体。
- InitializeBlueprintData():初始化数据并且赋值到FLiveLinkBaseBlueprintData中设置的变量里。
## 编写LiveLinkProvider(数据发送端)
>在Provider中编写传递数据过程
## 编写LiveLinkController
IsRoleSupportedd():判断Role是否为指定Role,即判断数据为什么类型Role的数据。
Tick():编写每帧处理逻辑。
## 使用
在LiveLink管理器中连接Provider
在Actor中挂载LiveLinkController组件