摘要: using UnityEngine; using System.Collections; //控制有放缩弹一弹的效果 public class ScaleController : MonoBehaviour { bool ismax = false; public float scaleSpeed 阅读全文
posted @ 2024-05-22 14:24 weigang 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 添加菜单构建按钮,使用下面API进行构建,注意设置和配置等 using System; using System.IO; using AssetBundles; using LiXiaoQian.Common.Editor.Tools; using UnityEditor; using UnityE 阅读全文
posted @ 2024-05-22 14:22 weigang 阅读(1) 评论(0) 推荐(0) 编辑
摘要: string tel="10086";Application.OpenURL("tel:" + phoneNumber); 阅读全文
posted @ 2024-05-22 14:19 weigang 阅读(3) 评论(0) 推荐(0) 编辑
摘要: IEnumeratorTool using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class IEnumeratorTool : MonoBehavi 阅读全文
posted @ 2024-05-22 14:15 weigang 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 1.什么是序列化和反序列化? 序列化:把对象转化为可传输的字节序列过程称为序列化。 反序列化:把字节序列还原为对象的过程称为反序列化。 2.序列化的目的? 序列化最终的目的是为了对象可以跨平台存储,和进行网络传输。而我们进行跨平台存储和网络传输的方式就是IO,而我们的IO支持的数据格式就是字节数组。 阅读全文
posted @ 2024-05-22 14:07 weigang 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 通过给UI或物体挂载下面脚本,来设置层级 using UnityEngine; using System.Collections; using UnityEngine.UI; namespace Common { //设置UI和render的层级 public class UIDepth : Mon 阅读全文
posted @ 2024-05-22 09:44 weigang 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 内存泄漏是优化方面的名词,主要是由于不再使用的资源没有及时清理,来释放内存,造成内存的浪费,造成系统卡顿。 或者说,内存就像花呗,额度就这么多,有借要有还,而且手里有闲钱的时候就记得还,以保证内存的充足,如果占着不用,就会在其他需要使用的时候内存不足,就容易崩溃出现问题。 Unity中的内存泄漏,分 阅读全文
posted @ 2024-05-21 15:38 weigang 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 一、找物体: ①GameObject: a).Find(string name)通过物体的名字查找 b).FindWithTag(string tag);通过标签获取添加该标签的一个物体 c).FindObjectOfType();依据组件类型 d).FindGameObjectsWithTag(s 阅读全文
posted @ 2024-05-21 15:10 weigang 阅读(1) 评论(0) 推荐(0) 编辑
摘要: using DG.Tweening; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using Utils; //挂在UI上面 public c 阅读全文
posted @ 2024-05-21 15:07 weigang 阅读(2) 评论(0) 推荐(0) 编辑
摘要: Timer和TimerManager代码 using System.Collections; using UnityEngine; public class Timer : MonoBehaviour { public delegate void Notifier(); public Notifie 阅读全文
posted @ 2024-05-21 15:04 weigang 阅读(1) 评论(0) 推荐(0) 编辑