2023年3月21日
摘要: public Texture2D texture;//图片(设为可读取) int w;//图片的宽 int h;//图片的高 void Start() { w = texture.width;//w*h不能超过65000 h = texture.height; VertexHelper vh = n 阅读全文
posted @ 2023-03-21 09:09 a帝 阅读(46) 评论(0) 推荐(0) 编辑
  2023年3月15日
摘要: public RectTransform redimg;//小地图中的人物红点 public Transform player;//人物 public Image map;//小地图(父级要有个Mash组件) public Texture2D texture; public int w=50; pu 阅读全文
posted @ 2023-03-15 09:39 a帝 阅读(24) 评论(0) 推荐(0) 编辑
  2023年3月13日
摘要: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; /// <summary> /// 摇杆 /// </summary> pub 阅读全文
posted @ 2023-03-13 19:25 a帝 阅读(35) 评论(0) 推荐(0) 编辑
  2023年3月10日
摘要: using System.Collections; using System.Collections.Generic; using System.IO; using System.Text; using UnityEditor; using UnityEngine; /// <summary> // 阅读全文
posted @ 2023-03-10 18:35 a帝 阅读(47) 评论(0) 推荐(0) 编辑
摘要: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.AI; using UnityEngine.UI; /// <summary> /// /// </sum 阅读全文
posted @ 2023-03-10 18:28 a帝 阅读(36) 评论(0) 推荐(0) 编辑
  2023年3月8日
摘要: using UnityEditor; using UnityEngine; /// <summary> /// 将预制体转个图片出来 /// </summary> public class ExportPicture : MonoBehaviour { public GameObject[] pre 阅读全文
posted @ 2023-03-08 14:20 a帝 阅读(14) 评论(0) 推荐(0) 编辑
摘要: using System.Collections; using System.Collections.Generic; using UnityEngine; [RequireComponent(typeof(SkinnedMeshRenderer))] public class CombinePla 阅读全文
posted @ 2023-03-08 14:15 a帝 阅读(46) 评论(0) 推荐(0) 编辑
  2023年3月3日
摘要: 只合并网格 public GameObject[] objs; // Start is called before the first frame update void Start() { Mesh mesh = new Mesh(); // 合并网格组件 List<CombineInstance 阅读全文
posted @ 2023-03-03 19:32 a帝 阅读(14) 评论(0) 推荐(0) 编辑
  2023年2月25日
摘要: 3d轮转图 俩个脚本 第一个挂空物体上 第二个挂在生成物上 using System.Collections; using System.Collections.Generic; using UnityEngine; using DG.Tweening; public class RotationC 阅读全文
posted @ 2023-02-25 09:46 a帝 阅读(31) 评论(0) 推荐(0) 编辑
  2023年2月22日
摘要: 绘制正方体: 用mesh自带的函数绘制: //创建一个mesh网格 Mesh mesh = new Mesh(); //添加网格过滤器 gameObject.AddComponent<MeshFilter>(); //给网格添加顶点 mesh.vertices = new Vector3[] { n 阅读全文
posted @ 2023-02-22 20:02 a帝 阅读(119) 评论(0) 推荐(0) 编辑