456人加入学习
(4人评价)
基于蓝图的产品配置器

制作完成于2021.01.31,基于Unreal 4.26.0

价格 免费

更换背景板颜色

 

game mod

1 第三行事件中插入 insert execution pin before

2 获取所有带有Tag的actor

get all actor of class with tag

目标:static mesh actor

tags: Background(记得是在actor的tag里面输入)

3 对背景增加对应的Tags

4 获取背景的mesh

 

mainUI

1 创建背景mesh变量,类型static mesh actor

勾选instance editable、expose on spawn(生成时公开)

调用的时候会自动创建

2 在game mode中,将background mesh挂接上

 

mainUI

创建设置颜色的函数

1 增加三个输入值 RGB

2 设置background_material

color参数的实例,需要创建材质实例(也可以直接设置)

3 获取背景mesh,set vector parameter value on materials,参数名称为color

4 拆开数据结构,也可以不拆开,创建一个make vector,将RGB一一连上

 

复制background_material,创建background_material_instence (材质实例)

将backgound挂接上

勾选可以设置color

 

重新烘焙build lighting only

 

将对应的color的按钮加上点击事件

设置对应的RGB值

 

检测一个对象是否创建成功

is vaild

 

[展开全文]

授课教师

SiKi学院讲师

课程特色

视频(28)
下载资料(1)