NGUI UITexture 设置帧动画闪烁(不显示)问题
来源:互联网 发布:西南大学网络教育2017 编辑:程序博客网 时间:2024/06/15 03:07
NGUI UITexture 设置帧动画闪烁(不显示)问题
解决:.enabled = false;
.enabled = true;
示例代码:
public class TextureAnimation : MonoBehaviour {public Texture[] TextureAll;private UITexture curtexture;public float speed = 0.01f;private float timer = 0;private int index = 0;// Use this for initializationvoid Start () {curtexture = GetComponent<UITexture> ();}// Update is called once per framevoid Update () {play ();}private void play(){if(TextureAll == null | TextureAll.Length<1){return;}timer += Time.deltaTime;if (timer > speed) {timer = 0;if (index < (TextureAll.Length - 1)) {index++;} else {index = 0;}curtexture.enabled = false;curtexture.mainTexture = TextureAll [index];curtexture.enabled = true;}}public void reset(){timer = 0;index = 0;curtexture.mainTexture = TextureAll[0];}}
阅读全文
0 0
- NGUI UITexture 设置帧动画闪烁(不显示)问题
- NGUI -- UITexture
- 【Unity3D】【NGUI】UITexture
- NGUI之UITexture
- Android的EditText设置光标一直显示而不闪烁的问题
- NGUI控件说明(中文) UITexture
- NGUI控件说明(中文) UITexture
- Unity NGUI UITexture 图片替换
- NGUI动画/UI解决刷新显示错误的问题
- NGUI:浅谈NGUI中UISprite和UITexture
- NGUI 动画执行多次设置
- NGUI的显示问题
- NGUI显示中文问题
- android平移动画闪烁问题
- NGUI的流光shader解决方案(一)(支持UITexture和使用图集的UISprite)
- NGUI的流光shader解决方案(二)(支持UITexture和使用图集的UISprite)
- NGUI研究院之UISprite和UITexture浅谈(十二)(图片大小优化)
- NGUI UISprite和UITexture 与内存
- 十五分钟介绍 Redis数据结构
- [我的作死案例]图书馆泡妹记 上
- C# GC疑问
- 响应式网页设计(Responsive web design)入门级定义
- Kotlin基础 10
- NGUI UITexture 设置帧动画闪烁(不显示)问题
- Kickstart Practice Round 2017 Problem B. Vote
- 插入排序
- container_of宏
- device_create()、device_register()、deivce_add()区别
- PHP实现微信开放平台扫码登录源码下载
- 百度地图 加标注
- 动态目录地址
- Leetcode题解---WildCard Matching Java实现