
Unity
AlvinUnity
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
常用的
# Unity 1.Animation gameObject.animation.wrapMode = WrapMode.Loop;//让动画循环播放 gameObject.animation.CrossFade("");//将当前的动画换成别的动画 2.LitJson 将LitJson.dll文件放入Plugins/Json中,使用时导入using Li原创 2017-08-24 14:49:40 · 285 阅读 · 0 评论 -
使用WWW方式读取StreamingAsset目录的图片
using System.Collections; using System.Collections.Generic; using System.IO; using UnityEngine; using UnityEngine.UI; public class UI_Main : MonoBehaviour { private Hashtable ht = new Hashtable(原创 2017-09-09 18:49:45 · 4601 阅读 · 4 评论 -
技能冷却效果
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class UI_Main : MonoBehaviour { private float timer = 0; private float coldTime =原创 2017-09-09 18:51:02 · 563 阅读 · 0 评论 -
一帧之内删除所有子级
public void ClearAllChild(Transform t) { Transform[] childs = new Transform[t.childCount]; for (int i = 0; i < childs.Length; i++) { childs[i] = t.GetChild(i);原创 2017-09-09 19:40:56 · 358 阅读 · 0 评论 -
NGUI优化ScroolView中Grid子级太多导致的滑动问题
当ScrollView中Grid子级太多的时候,会导致卡顿的效果。通过重写MultiRowWrapContent的函数即可有效解决。只需要在Grid上绑定这一个脚本,填写Item的数量,以及单元格大小,滑动的时候就会自动调整Item位置,来实现完美的显示效果。 ``` C# using UnityEngine; public class MultiRowWrapContent原创 2017-09-09 19:41:30 · 813 阅读 · 1 评论