- 博客(7)
- 收藏
- 关注
原创 unity中委托机制使用(一)
一、委托事件封装using System.Collections.Generic;public delegate void EventDelegate();public delegate void EventDelegate<T>(T t);public delegate void EventDelegate<T1, T2>(T1 t1,T2 t2);/// <summary>/// 无参事件/// </summary>public cla
2021-06-29 17:33:06
242
2
原创 Ini文件在unity(c#)中的使用
1、ini文件简介主要用于存放数据量较小的文本性质的配置信息,具体实施根据实际需求来定。1.1 文件格式[SectionName1] //节点1KeyName1=Value1 //key/valueKeyName2=Value2........[SectionName2] //节点2KeyName1=Value1KeyName2=Value2........1....
2021-06-29 16:36:51
409
原创 Unity精简的UI框架
UIManager.cs UI管理类using System.Collections;using System.Collections.Generic;using UnityEngine;using System;using Valve.VR;/// <summary>/// UI管理器(单例)用于管理界面的打开、隐藏、删除等操作/// </summary&g...
2020-03-26 15:18:12
340
原创 unity笔记(遍历子物体,改变recttransform大小,委托delegate,射线检测,游标,toggle使用)
6 unity中遍历子物体方法 for (int i = 0; i < transform.childCount; i++) { if (transform.GetChild(i).GetComponent<Text>()) { frontinit = transform....
2019-02-14 18:26:01
631
原创 unity笔记
1 打包横竖屏设置Portrait:竖屏Portrait Upside Down:竖屏,手机倒过来Landscape Right:横屏,屏幕在home键右边Landscape Left:横屏,屏幕在home键左边(比较常用)Auto Rotation:自动旋转屏幕 2 电脑时间获取System.DateTime.Now); //当前时间(年月日时分秒)...
2019-01-29 11:14:44
195
原创 json用法整理(一)
1 json作用:用于数据传递2 常用格式:数组和对象2.1数组:[{"id":1,"name":"weapen","damage"::10000},{"id":2,"name":"drug""hp":10000,"mp":10000}]2.2对象:{ "name": "BeJson", "url": "htt
2018-04-14 15:38:20
242
原创 unity中UGUI图片箭头指向鼠标位置
初学unity,公司项目中遇到的一个简单小功能,重新回顾了初高中的额数学知识,希望对同样初学者有用,demo就不上传了,工程中只用到一个图片(image),代码拖进去就能用了。效果如图using UnityEngine;using System.Collections;using UnityEngine.UI;public class PlayerControl
2017-08-29 23:02:26
3658
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人