Unity第三方库Procedural Circular Health Bar的核心组件添加到Image(UGUI)中时不能正确在Game窗口显示(显示色块)

Procedural Circular Health Bar是一款分段圆形血量条的第三方package

有段时间可以免费录取,商品链接如下

Procedural Circular Health Bar | GUI 工具 | Unity Asset Store

该资源附带一个易于使用的脚本,可以添加到任何附加了Spriterender或Image组件的游戏对象中。

使用的时候发现在附加到有UGUI的Image组件的物体上时,在Scene窗口能正确显示,但是在Game窗口不能正确显示

 经过邮件咨询作者后,对方回复说是可能是由于Shader Graph中的一个bug造成的,该bug使得材质“Sprite Unlight”和“Unlight”似乎共享了部分设置(Graph Settings)。解决方案如下

Step 1: Open the shader graph. UltimateCircularHealthBar > ShaderGraphs > RadialBarShader

This step comes with a significant load time! This is because shader graph has a hard time dealing with larger graphs.

 

Step 2: Open the graph inspector if it isn't already open

 

Step 3Enable "Alpha Clipping" in the "Universal" section of the Graph Inspector in the "Graph Settings" tab

 

Step 4: Switch Material to "Sprite Unlit".

 

Step 5: save asset and finish.

 

上述步骤完成后,能正确显示

 

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值