上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 18 下一页

2020年9月16日

Unity 设置图片宽度和获取图片宽度

摘要: Text txt = transform.GetChild(0).GetComponent<Text>(); setWith = txt.GetComponent<RectTransform>().rect.width; RectTransform rectFransF = transform.Ge 阅读全文

posted @ 2020-09-16 11:51 zqiang0803 阅读(3302) 评论(0) 推荐(0) 编辑

2020年9月8日

Unity 获取highlightedSprite名字

摘要: sender.GetComponent<Button>().spriteState.highlightedSprite.name 阅读全文

posted @ 2020-09-08 15:11 zqiang0803 阅读(272) 评论(0) 推荐(0) 编辑

2020年9月7日

Unity 上下拖动图片

摘要: using UnityEngine; using UnityEngine.EventSystems; using DG.Tweening; public class MoveObj : MonoBehaviour, IDragHandler, IPointerDownHandler { //priv 阅读全文

posted @ 2020-09-07 09:25 zqiang0803 阅读(315) 评论(0) 推荐(0) 编辑

2020年9月1日

Unity发布WebGl注意事项

摘要: https://blog.csdn.net/k20132014/article/details/78448142 阅读全文

posted @ 2020-09-01 14:05 zqiang0803 阅读(167) 评论(0) 推荐(0) 编辑

2020年8月31日

unity 给物体角度赋值

摘要: transform.localPosition和transform.localScale都是直接赋值三元数,给旋转赋值需要用 方法一: xxx.transform.localEulerAngles = new Vector3 (0.0f,0.0f,0.0f); 方法二: xxx.transform. 阅读全文

posted @ 2020-08-31 14:37 zqiang0803 阅读(1233) 评论(0) 推荐(1) 编辑

2020年8月28日

Unity 批量替换字体

摘要: using UnityEngine; using UnityEditor; using UnityEngine.UI; public class ChangeFontWindow : EditorWindow { [MenuItem("Tools/更换字体")] public static void 阅读全文

posted @ 2020-08-28 11:42 zqiang0803 阅读(565) 评论(0) 推荐(0) 编辑

2020年8月21日

unity 获取图片的宽度

摘要: ShowPic.GetComponent<RectTransform>().rect.size.y 阅读全文

posted @ 2020-08-21 17:47 zqiang0803 阅读(870) 评论(0) 推荐(0) 编辑

2020年8月20日

unity 加载图片,并且图片不在resource、StreamingAssets里面。

摘要: using UnityEngine; using UnityEngine.UI; using System.Collections; using System.Collections.Generic; using System.IO; public enum UI_name{ UpBtn, Down 阅读全文

posted @ 2020-08-20 11:45 zqiang0803 阅读(970) 评论(3) 推荐(0) 编辑

unity 获取文件夹里面有多少个png图片

摘要: //using System.IO; string filePath= Application.dataPath+ "/新建文件夹"; if (Directory.Exists(filePath)) {//判断这个路径是否存在 DirectoryInfo direction = new Direct 阅读全文

posted @ 2020-08-20 11:20 zqiang0803 阅读(698) 评论(0) 推荐(0) 编辑

unity C#文件夹操作之Directory类和DirectoryInfo类

摘要: https://blog.csdn.net/a_lllll/article/details/86565280 //删除此目录 Directory.Delete(@"C:\Users\Administrator\Desktop\新建文件夹") //删除此目录,true表示要是此目录有子目录也删除,否则 阅读全文

posted @ 2020-08-20 09:42 zqiang0803 阅读(1559) 评论(0) 推荐(0) 编辑

上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 18 下一页

导航