惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
博客园 - Franky
GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
博客园_首页
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
C
CERT Recently Published Vulnerability Notes
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
L
LangChain Blog
L
LINUX DO - 最新话题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
AI
AI
T
Troy Hunt's Blog
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
S
Secure Thoughts
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Security @ Cisco Blogs
Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
Attack and Defense Labs
Attack and Defense Labs

博客园 - facewater

Error: Permission denied @ apply2files Error: Cannot find module 'internal/fs' pecl install imagick CentOS 7.0系统安装配置LAMP服务器(Apache+PHP+MariaDB) ionic hybrid备忘 pod 出错备忘 kwm备忘 mysql用shell建100多字段表并导入 mac下python实现vmstat 架设laravel 桌面oracle 11g导入多年库的dump备忘 Linux64位服务器编译安装MySQL5.6(CentOS6.4) 64位Linux下编译搭建Nginx1.5与PHP5.5(CentOS6.4) linux 环境变量 yii2高级应用 android 九宫加密记事本 Unity3D]引擎崩溃、异常、警告、BUG与提示总结及解决方法 u3d动态加入模型 Unity3d 在不同设备中的文件读写 的路径
EZGUI下的动态图片的处理
facewater · 2013-11-02 · via 博客园 - facewater

EZGUI的使用过程中,有时需要使用动态的图片,比如商店里面商品的ICON,好友的头像等,通过使用SimpleSprite可以实现这个功能。

比如一个通过网络显示好友头像:

WWW www = new WWW("FriendIconPath");

yield return www;

SimpleSprite ss = myTransform.GetComponent<SimpleSprite>();

ss.SetTexture(www.texture);//设定图片

ss.SetUVs(new Rect(0,0,1,1));//设定UV

最后一句:ss.SetUVs(new Rect(0,0,1,1)); 比较重要,因为通过网络下载的图片大小是不确定的,这就需要重新设置一下UV,让整个图片都显示出来。

最近在用unity3d做一个即时对战项目,需要对士兵进行着色。由于对shader不是很了解,折腾了很长时间才完成一个着色材质,希望对需要的人有用。

工程地址:https://github.com/flyhigh/Unity3d---shader

核心主要是叫做Hero_01_tAh.png的alpha贴图,染色区域设置为白色不透明,其他区域设置成全透明。