自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(75)
  • 资源 (5)
  • 收藏
  • 关注

原创 unity 使用UnityWebRequest从服务器下载

含义:表示请求已经成功发送到服务器,但服务器返回的响应违反了HTTP协议规范,因此被视为无效响应。说明:这可能是由于响应数据格式不正确、数据损坏或解析响应数据的代码存在错误等原因导致的。说明:这可能是由于服务器配置错误、请求格式不正确或服务器内部错误等原因导致的。含义:表示请求尚未完成,即请求正在处理中,还没有收到服务器的响应。含义:表示请求成功收到服务器的响应,但在处理响应数据时发生了错误。含义:表示请求成功完成,并且已经收到了服务器的有效响应。含义:表示请求在尝试与服务器建立连接时发生了错误。

2024-07-06 15:29:50 351

原创 unity对于文件夹的操作

注:如果在执行完Read后要修改该文件,可以之间在后面加上File.WriteAllLines,若执行Write_Bool则会因为Read占用此文件而报错。FileInfo一般被用来获取文件信息。2、获取目标文件夹内指定文件。6、写入txt和读取txt。安卓平台读取txt逐行读取。3、移动文件到指定文件夹。4、获取文件创建时间。

2024-07-04 01:12:23 339

原创 unity屏幕截图

【代码】unity屏幕截图。

2024-07-03 16:50:55 274

原创 Unity 粒子特效(下)

【代码】Unity 粒子特效(下)

2024-07-02 16:45:11 757

原创 unity 粒子特效

若修改特效下关于颜色的设置无变化,则需要修改材质球Shader。

2024-06-24 11:20:51 363

原创 unity wheel collider

较大的值会使悬挂弹簧更硬,对于颠簸的响应更快,但可能会导致车辆过于颠簸。较小的值则会使悬挂弹簧更软,提供更平稳的体验,但可能会降低车辆的操控性。当设置的较大时,轮胎在侧向移动时受到的阻力较大,车辆的操控性好,更稳定。当这个值设置较大时,轮胎在向前滚动时受到的阻力较大,车辆可能更难加速,但稳定性会更好,不容易打滑。用于模拟车辆悬挂系统的属性,包含了车轮悬挂弹簧的参数,用于控制车轮在遇到颠簸路面时的响应和表现。9、Mass:车轮质量,这个属性决定了车轮的惯性,质量越大,改变其运动状态所需的力就越大。

2024-06-22 02:32:30 111

原创 unity 异步async Task

= Sd();{});

2024-06-12 15:13:40 68

原创 Windows 下载安装Apache

以管理员身份运行cmd,输入D:\Apache\apache\Apache24\bin\httpd -k install -n Apache。1、在Apache安装包中使用ApacheMonitor.exe启动,在D:\Apache\apache\Apache24\bin里面。1、打开Apache官网http://httpd.apache.org,点击Download。点击后会在右下角出现小图标,可在小图标中启动,也可双击小图标,在可视化面板中启动。2、选择Windows版本,点击链接。

2024-05-22 23:05:36 868

原创 unity AddListener监听多个参数方法

在有for循环时,在使用delegate或者lambda表达式,需要使用临时变量。

2023-08-08 16:01:37 546

原创 unity 修改天空盒

2、在相机上添加组件Skybox。1、在Lighting中修改。

2023-06-07 15:56:11 183

原创 Unity发布WebGL报错il2cpp.exe did not run properly

6)、依次打开计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList,浏览该标签页下元素,找到值为“C:\Users\用户名”的项,将其修改为“C:\Users\新用户名”4)、注销目前账户,切换至administrator,进入c\Users,将中文用户名文件夹重新命名为英文名。7)、打开控制面板—用户账户—其它账户—更改账户名称,将中文名改为英文。3)、右键—属性—取消勾选账户已禁用。

2023-05-30 14:59:22 977

原创 IIS(internet Information Services)安装与配置

1、打开控制面板,找到程序与功能,然后打开程序和功能的页面,点击启用或关闭Windows功能。2、如图选择需要安装的节点,点击确定,稍等即可完成。

2023-05-30 14:13:59 313

原创 Unity WebGL打包配置本地服务器

1、None 无:选择这个你不需要任何异常支持。这提供了最佳的性能和最小的构建。使用这个选项,任何异常的抛出都会停止运行。2)、然后选择IIS(Internet Information Services)双击进入。3)、找到网站右键添加网址或者在面板右侧添加网址。6)、再次在左边点击刚刚创建的,然后在右侧点击浏览。没有配置IIS的,可根据下面这篇文章配置。5)、点击刚刚创建的,设置MIME类型。1)、打开控制面板,找到管理工具。3)、遇到异常以及压缩格式。2)、设置打包的窗口大小。4)、根据下面设置好。

2023-05-30 13:55:43 1370

原创 unity自带录屏UnityRecorder

一、打开“Window”-“Package Manager”。二、选择Unity Registry模式。三、在下面找到Unity Recorder。四、在”Window“-“General”-“Recorder”-“Recorder Window”。

2022-03-24 10:33:52 9281

原创 unity Invoke

// 方法名,延迟时间Invoke(“yu”, 3);在3秒后执行”yu“方法Time.timeScale = 0时不执行

2021-07-29 16:27:23 162

原创 unity 发光材质

EnableKeyword 负责打开_EMISSIONthis.GetComponent().material.EnableKeyword("_EMISSION");this.GetComponent().material.SetColor("_EmissionColor", Color.white);

2021-07-26 11:55:02 674

原创 unity 使用Touch点击跟随移动以及放大缩小图片

//图片集合public List<Sprite> TE = new List<Sprite>(); //图片物体public GameObject a;bool BA = false;int I = 0;// Start is called before the first frame updatevoid Start(){ a.GetComponent<Image>().sprite = TE[0];}float flo;flo

2021-07-21 22:48:14 1741 4

原创 unity 屏幕坐标转世界坐标

屏幕坐标转世界坐标不能直接transform.position = Camera.main.ScreenToWorldPoint(Input.mousePosition);这样的话输出的坐标为固定值Vector3 v3 = new Vector3(Input.mousePosition.x, Input.mousePosition.y, 10);transform.position = Camera.main.ScreenToWorldPoint(v3);...

2021-07-21 10:39:41 1103 1

原创 unity Touch

public Text infoText;string Info;void Update(){ //每当一个手指触摸屏幕时,都会生成一个Touch对象,Input.touchCount可以获取当前Touch对象的个数 if (Input.touchCount>0) { Info = string.Empty; Info += "touchCount:" + Input.touchCount + "\n"; //

2021-07-16 14:48:41 172 2

原创 unity ref以及out

正常情况下void Start(){int s=5;num( s);print(s);}public void num( int str){ str++;}print会输出5加入refvoid Start(){int s=5;num(ref s);print(s);}public void num(ref int str){ str++;}print输出6加入outvoid Start(){int s=5;num(out s);pri

2021-07-12 15:31:33 198 4

原创 Unity XML 新建 查询 修改 增加 删除

using System.Collections;using System.Collections.Generic;using UnityEngine;using System.Xml;public class xmll : MonoBehaviour{// Start is called before the first frame updatevoid Start(){LoadXml("/coom.xml");ModifyXML("/coom.xml");DeleteXML("/c

2021-07-09 17:57:39 239 2

原创 unity Dotween

public GameObject cube;// Start is called before the first frame updatevoid Start(){ //表示方向以及强度;震动时间;震动次数;当为0时,震动幅度只会在当前坐标与目标坐标之间,不为0时,会计算一个点,震动幅度在这个点和目标点之间 // transform.DOPunchPosition(new Vector3(2, 2, 2), 5, 5, 0f);//移动 transform.DOPunc

2021-07-07 12:24:51 1282 1

原创 unity Event Trigger事件

//检测鼠标是否在UI上public void PointerEnter(){print("进入UI ");}public void PointerExit(){ print("退出UI");}//在UI上按下,即使在UI外抬起也会调用PointerUp,但是在UI外抬起不会调用PointerClickpublic void PointerDown(){ print("鼠标按下");}//鼠标按下事件 在PointerDown执行顺序之后public void

2021-07-05 15:06:06 1560 1

原创 unity 委托

using System.Collections;using System.Collections.Generic;using UnityEngine;public class Control : MonoBehaviour{public delegate void DelegateTool(string zimu);Enev se = new Enev();void Start(){ //方法一 text("sdhj", se.A); text("jkk",

2021-06-30 10:25:38 87 2

原创 Unity 使用UI搭建下拉复选框 ,Toggle监听事件

using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.UI;public class Drow : MonoBehaviour{//下拉框面板public GameObject Dro;string str;//public List<Toggle> to;List<string> strlist=new List<str

2021-06-23 15:04:51 724

原创 unity动态加载Button方法

List btnsName = new List();btnsName.Add(“btn_供”);btnsName.Add(“btn_设”);btnsName.Add(“btn_能”);btnsName.Add(“btn_列”);btnsName.Add(“btn_供”);btnsName.Add(“btn_经”);foreach (string btnName in btnsName){GameObject btnObj = this.transform.Find(btnName).ga

2021-06-19 11:50:43 695 2

原创 unity 优化

1、for比foreach省性能

2021-04-07 17:39:36 56

原创 unity 物体显示和隐藏执行内容方法

物体显示: OnEnable()物体隐藏: OnDisabl()

2021-03-10 10:03:55 1157

原创 unity 查找材质球属性名

1,点击材质球,看Inspector面板,面板会出现材质球详细信息。2、点击右上角的小齿轮。3、选择Select Shader。4、下面Properties就是材质球属性名。获取材质球_TintColor信息this.GetComponent().material.GetColor("_TintColor")修改材质球_TintColor信息this.GetComponent().material.SetColor("_TintColor", new Color(128/255, 0.5f,

2020-12-03 14:55:14 2936

原创 unity 射线以及聚焦点击事件

using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.UI;public class shexian : MonoBehaviour{private LineRenderer line;//注视时出现的动态圆环public GameObject circle;string objetname;string newname;string overName;

2020-11-30 12:10:49 596

原创 unity UI闪烁

//定义一个颜色,默认是黑色private Color SColor;void Update(){SColor= new Color(255, 255, 255);//1*Time.time是闪烁频率,1F就是颜色a的最大值,从完全透明到完全不透明SColor.a = Mathf.PingPong(1 * Time.time, 1F);//获取UI的image组件的颜色并把上面变化的颜色赋值GetComponent().color = SColor;}...

2020-11-17 11:41:21 637

原创 unity 使用UGUI播放视频

1、创建一个RawImage。2、添加组件Video Player。3、将要播放的视频拖到Video Cilp。4、添加脚本using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.UI;using UnityEngine.Video;public class v : MonoBehaviour{// Start is called before the f

2020-11-13 14:33:22 529

原创 unity AudioSource

using System.Collections;using System.Collections.Generic;using UnityEngine;public class PlayAudioSou : MonoBehaviour{AudioSource PAS;public AudioClip[] AC;Dictionary<string, int> DicAudioSou = new Dictionary<string, int>();// Start is

2020-11-06 10:06:36 115

原创 unity 读写txt文件

using System.Collections;using System.Collections.Generic;using System.IO;using UnityEngine;public class writetxt : MonoBehaviour{// Start is called before the first frame updatevoid Start(){}// Update is called once per framevoid Update(){

2020-11-05 18:23:09 277

原创 unity Button

using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.UI;public class Btn : MonoBehaviour{public GameObject Mode;public GameObject oBtn;public GameObject wBtn;public GameObject MainBtn;// Start is called be

2020-11-05 16:07:36 116

原创 unity 协程(IEnumerator)开启与关闭

1.直接使用协程方法名开启协程 StartCoroutine(“协程方法名 “);关闭协程 StopCoroutine(“协程方法名 “);2.使用协程方法名加参数开启协程 StartCoroutine(“协程方法名”,参数); 该方法只适用于协程只有一个参数的时候关闭协程 StopCoroutine(“协程方法名”);3.使用方法开启协程 StartCoroutine(协程方法名(参数));<该方法中的参数个数随意关闭协程 StopCoroutine(协程方法名(参数));<

2020-10-28 15:49:23 1541

原创 unity 地震

using System.Collections;using System.Collections.Generic;using UnityEngine;public class zhendong : MonoBehaviour{private Vector3 _lastPosition;private Vector3 _lastRotation;public Vector3 MaximumTranslationShake = Vector3.one * .75f;public float s

2020-10-27 10:07:31 619 2

原创 unity 使用滚动条控制文本

1、创建一个Image,降低透明度做背景。挂载上Scroll Rect,Content Size Fitter,Mask三个组件。2、在其下创建一个Text子物体,挂载上Content Size Fitter组件,将Vertical Fit改为Preferred Fit。将其拖拽至Image下Scroll Rect组件的Content中。3、在Image下再创建一个子物体Scrollbar,将其拖拽至Image下Scroll Rect组件的Vertical Scrollbar中。public Text

2020-10-16 15:08:31 821

原创 随记

bool a=false;float f1 = 6;float f2 = 5;float z;void Update () { if (Input.GetKeyDown(KeyCode.Space)) { a = !a; z = a ? f1 : f2; print(z); }}

2019-11-28 11:22:39 70

原创 unity Input

Input:imeIsSelected(带有ime的就是和输入法有关系)Input.GetButton()虚拟按键 Edit下的Project Settings中Input里面设置print(Input.GetAxis(“Horizontal”));返回float值 递增或递减 最大正负1transform.Translate(Vector3.forward * Time.deltaTi...

2019-09-24 23:31:44 211

Glow.unitypackage

unity 边缘发亮闪烁。

2021-07-08

Graph.unitypackage

适用于unity 表格,图表等,是一个表格插件。

2021-07-08

unity AVProVideo

此插件为unity播放视频插件,通过使用插件来快速播放视频。方便快捷好用。版本使用应该没什么问题。此插件应该时目前比较好用的视频播放插件。

2020-11-11

unity 特效包

本包为特效包,下载可直接导入unity里面使用。如下载发现有问题可联系我。

2018-11-26

html文本格式

里面有一个html的基本格式,下载只需要填写内容即可。

2018-11-01

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除