
u3d
咩咩~羊
这个作者很懒,什么都没留下…
展开
-
Unity接口实例
记录一下自己学习接口编写第一步 先创建接口using System.Collections;using System.Collections.Generic;using UnityEditor;using UnityEngine;/// <summary>/// 接口函数/// 接口函数的实现/// </summary>public class ObjState : ICallback{ public void OnIdle(string _i原创 2022-04-27 11:58:52 · 2809 阅读 · 0 评论 -
UNITY打包WebGL常见问题整理
1.浏览器报错Uncaught ReferenceError: unityFramework is not defined at HTMLScriptElement.r.onload可能原因:Unity内设置压缩方式将压缩格式调整为Disabled打包时:一定不能有中文路径路径过长有时候会打包失败其他没有问题时,打包有时会失败,需要重启电脑或者unity程序发布WebGL平台后出现部分文字消失,或显示不全的解决办法。项目中因DoTween冲突时,可以删除 .MD...原创 2021-12-23 09:52:53 · 4982 阅读 · 0 评论 -
unity获取机器唯一标识符
1.SystemInfo类Debug.Log(SystemInfo.graphicsDeviceID);//获取显卡的唯一标识符Debug.Log(SystemInfo.deviceUniqueIdentifier);//获取设备唯一标识符Debug.Log(SystemInfo.deviceType);//获取设备的类型Debug.Log(SystemInfo.processorType);//获取处理器的类型2.PCusing System.Net.NetworkInformation;原创 2021-05-21 09:49:00 · 1370 阅读 · 0 评论 -
Unity强制刷新UI
/// <summary> /// 强制刷新UI /// </summary> /// <param name="rect"></param> /// <returns></returns> IEnumerator UpdateLayout(RectTransform rect) { LayoutRebuilder.ForceRebuildLayoutImmediate(r原创 2021-04-09 14:18:01 · 1401 阅读 · 0 评论 -
Unity 时间格式化 调用system获取时间并格式化
日期转化一为了达到不同的显示效果有时,我们需要对时间进行转化,默认格式为: 2007 - 01 - 03 14 : 33 : 34 ,要转化为其他格式,要用到DateTime.ToString的方法(String, IFormatProvider),如下所示: using System; using System.Globalization;String format = " D " ;DateTime date = DataTime,Now;Response.Write(date.T转载 2021-04-03 18:28:58 · 2035 阅读 · 0 评论