[UE4]更通用的接口,将UserWidget作为图标添加到小地图

 将图标改成UserWidget添加到小地图,UserWidget支持动画特效,更丰富小地图的功能。

 

一、在小地图图标结构体中,将Flag数据类型改成UserWidget,删除ImageWidget(类型是Image,因为不需要了)

 

二、注意:动态添加UserWidget到其他UserWidget,需要使用Create Widget函数,然后使用父级UserWidget的容器的Add Child to Canvas方法(不同容器对应不同的Add Child方法)

 

posted on 2018-11-29 14:08  一粒沙  阅读(1996)  评论(0编辑  收藏  举报