博客
关于我
UGUIImage透明渐变
阅读量:95 次
发布时间:2019-02-26

本文共 935 字,大约阅读时间需要 3 分钟。

Unlit ImageAlpha Shader?C#??????

?????????Unlit ImageAlpha shader?C#???????UI???????

??Unlit ImageAlpha Shader??

Unlit ImageAlpha shader?????????????????????????????

  • _AlphaLX?????X?
  • _AlphaRX?????X???
  • _AlphaTY?????Y?
  • _AlphaBY?????Y???
  • _AlphaPower?????????
  • ???????????????????????????????

    ??C#??????

    C#???????????????????????

    using UnityEngine;using UnityEngine.UI;

    public class NewBehaviourScript : MonoBehaviour{public float A = 0;public Material _Material;

    void Start() {    _Material = GetComponent().material;}void Update() {    if (transform.localPosition.y > 0)     {        _Material.SetFloat("_AlphaRX", (50 - transform.localPosition.y) / 50);    }}

    }

    ????????????Y????????Material?Alpha????????????????

    ???????????

    ????????????????????????

  • ???????????
  • HUD????????
  • ??????????????????UI??
  • ????????

  • ??Material?Script?????
  • ?????Material?????????
  • ????????C# Script?????????
  • ?????????Alpha???????
  • ????????????????????????????????????

    转载地址:http://qokz.baihongyu.com/

    你可能感兴趣的文章
    PON架构(全光网络)
    查看>>
    PoolingHttpClientConnectionManager原理剖析
    查看>>
    POP-一个点击带有放大还原的动画效果
    查看>>
    POP3 协议在计算机网络中的优缺点
    查看>>
    Portaudio笔记-WASAPI
    查看>>
    position:fixed失效情况
    查看>>
    Position属性四个值:static、fixed、absolute和relative的区别和用法
    查看>>
    POSIX thread编程中关于临界区内条件变量的分析
    查看>>
    POSIX与程序可移植性
    查看>>
    posix多线程有感--自旋锁
    查看>>
    SpringBoot中集成海康威视SDK实现布防报警数据上传/交通违章图片上传并在linux上部署(附示例代码资源)
    查看>>
    POSIX标准和XSI扩展
    查看>>
    post install error,please remove node_moules before retry
    查看>>
    PostGIS中获取所有EPSG的编码以及对应Proj4字符串
    查看>>
    PostGIS在Windows上的下载与安装
    查看>>
    postgis数据库优化_postgresql 性能优化
    查看>>
    Postgres Docker版本安装mysql_fdw 插件
    查看>>
    Postgres invalid command \N数据恢复处理
    查看>>
    Postgres like 模糊查询匹配集合
    查看>>
    Postgres 自定义函数内实现 in 操作符的递归查询
    查看>>