![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Unity
奇大可
IT小伙
展开
-
Unity 字典套字典 Dictionary套Dictionary
【代码】Unity 字典套字典 Dictionary套Dictionary。原创 2023-04-18 15:28:15 · 258 阅读 · 0 评论 -
WebGL自适应画面
WebGL自适应画面原创 2023-02-22 09:55:54 · 264 阅读 · 0 评论 -
Unity 导EXE自适应
【代码】Unity 导EXE自适应。原创 2023-02-14 10:23:15 · 720 阅读 · 0 评论 -
Unity 动态调整画面质量
0-5分别对应着面板由上而下的质量等级。原创 2023-01-07 15:45:36 · 1528 阅读 · 0 评论 -
Unity3D中防止射线穿透UI
【代码】Unity3D中防止射线穿透UI。原创 2023-01-07 10:03:01 · 1514 阅读 · 0 评论 -
Unity平台判断
【代码】Unity平台判断。原创 2022-12-28 15:27:49 · 443 阅读 · 0 评论 -
Unity 导exe带报错日志
Unity 导exe带报错日志原创 2022-12-09 09:35:02 · 458 阅读 · 0 评论 -
Unity物体自发光
【代码】Unity物体自发光。原创 2022-09-29 09:46:31 · 1479 阅读 · 0 评论 -
unity SDK/NDK的下载
unity NDK下载原创 2022-08-29 14:24:30 · 1867 阅读 · 0 评论 -
Unity中文设置
Unity中文设置原创 2022-08-22 09:19:06 · 5636 阅读 · 4 评论 -
Unity全局音量控制
Unity全局音量控制原创 2022-08-19 09:53:29 · 1198 阅读 · 0 评论 -
Scroll View 滑动条老在底下
Scroll View 滑动条老在底下原创 2022-08-16 12:01:39 · 191 阅读 · 0 评论 -
Unity WebGL移动端去除警告
修改Build\UnityLoader.js。把下面代码替换成false为了避免每次构建时都需要手动更改,使用PostBuildHandler脚本。Editor下创建PostBuildHandler脚本原创 2022-06-22 10:07:21 · 565 阅读 · 0 评论 -
unity发布 webgl在手机端 inputfield唤醒键盘输入
unity发布 webgl在手机端inputfield怎么唤醒键盘输入原创 2022-06-21 09:28:33 · 2536 阅读 · 9 评论 -
C#文本框显示提示信息,文本框获得焦点,文本框为空
1.先在目标文本框中放置一个label,然后在窗体的代码页中添加标签初始化的方法:然后在窗体的Load事件中添加该方法;2.在该label的属性页双击MouseDown事件,然后在代码设计器中添加如下代码:tBoxRPaswd就是装label的目标文本框。3.在目标文本框的Leave事件中添加如下代码:4.运行程序,看是否达到效果我自己用这个方法达到了目的,所以这个方法应该有效。转载 2022-06-02 13:20:49 · 2678 阅读 · 0 评论 -
C# .net 实现 Websocket
WEBSOCKT原创 2022-06-02 09:14:55 · 600 阅读 · 0 评论 -
unity terrain看不到远处的树木
原创 2022-05-27 08:55:48 · 1422 阅读 · 0 评论 -
SteamVR Demo 用名字分辨那些可行走
VRTK_Pointer //脚本ExecuteSelectionButtonAction() if (pointerRendererDestinationHit.transform && IsPointerActive() && pointerRenderer.ValidPlayArea() && !PointerActivatesUseAction(pointerInteractableObject) && pointerRend..原创 2022-05-26 09:36:50 · 102 阅读 · 0 评论 -
Unity打印log日志
using UnityEngine;using System.Collections;public class GuiDebug : MonoBehaviour{ private bool bShow = false; public Rect windowRect0 = new Rect(80, 100, 420, 366); public string mSzLog = ""; // Use this for initialization voi.原创 2022-04-13 13:06:49 · 2174 阅读 · 0 评论 -
Unity webgl 加载网络图片
using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.Networking;using UnityEngine.UI;public class LoadPic : MonoBehaviour{ public string url = "http://www.dashanpao.vip/ceshi/DD.png"; void Awake() .原创 2022-04-08 13:29:54 · 647 阅读 · 0 评论 -
Unity webgl读取streamingAssetsPath文件夹txt
using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.Networking;using UnityEngine.Events;using System.IO;public static class StreamingAssetPathConfigReader{ /// <summary> /// 读取StreamingAsse.原创 2022-04-07 16:39:48 · 1690 阅读 · 0 评论 -
unity 随机数不重复
using System.Collections;using System.Collections.Generic;using UnityEngine;public class RandmR : MonoBehaviour{ private int[] testArray; private int total; private int count; private int[] sequence; private int[] output; //.原创 2022-03-30 09:35:24 · 4883 阅读 · 0 评论 -
unity ugui改变width,height,pos
1.改变RectTransform的bottomGetComponent<RectTransform>().offsetMin = new Vector2(GetComponent<RectTransform>().offsetMin.x, bottom);2.改变RectTransform的topGetComponent<RectTransform>().offsetMax = new Vector2(GetComponent<RectTr...转载 2022-02-18 09:31:25 · 2384 阅读 · 1 评论 -
Unity 刮刮卡拖动UI,随便擦除,转着圈擦,360度
原创 2022-02-17 16:22:59 · 3006 阅读 · 3 评论 -
UGUI看向一个位置
public Transform target; // Use this for initialization void Start () { } // Update is called once per frame void Update () { gameObject.transform.rotation = turntodirection(gameObject.transform.position, target.position); }.原创 2021-12-03 10:04:13 · 66 阅读 · 0 评论 -
c#获取文本,修改某行值
/// <param name="strIndex">索引的字符串,定位到某一行</param> /// <param name="newValue">替换新值</param> public void ReplaceValue(string strIndex, string newValue) { string jsonTest = Application.dataPath + "/StreamingAssets/co.原创 2021-11-18 18:15:54 · 2202 阅读 · 0 评论 -
世界坐标转成屏幕坐标
public Camera foregroundCamera;//主相机Vector3 headjoint;headjoint=foregroundCamera.WorldToScreenPoint(headjoint);headjoint = foregroundCamera.ScreenToWorldPoint(headjoint);原创 2021-08-17 14:31:23 · 249 阅读 · 0 评论 -
Unity 截屏缩放图片保存
IEnumerator getScreenTexture(){yield return new WaitForEndOfFrame();bytes = CameraCapture(AC).EncodeToJPG();Sprite sprite = Sprite.Create(CameraCapture(AC), new Rect(0, 0, CameraCapture(AC).width, CameraCapture(AC).height), new Vector2(0.5f, 0.5f));_.原创 2021-06-03 11:42:07 · 308 阅读 · 0 评论 -
Unity上传图片到服务器及服务器如何配置
1.本人使用阿里云win服务器下载phpstudy并安装到服务器上链接:https://pan.baidu.com/s/1E597yRPxN7hjkCT5LTC3Ww 提取码:wij9安装成功后,把套件里面的 Apache.2.4.39那一行后面的启动打开,目前上传图片打开这一个就行2. 再下载UpLoad链接:https://pan.baidu.com/s/1IA8...原创 2021-03-03 18:21:24 · 1651 阅读 · 4 评论 -
unity 打安卓包 华为手机图片被压扁
加一行Screen.SetResolution(Screen.width, Screen.height, true);原创 2021-02-01 11:05:10 · 313 阅读 · 0 评论 -
Unity SDK JDK 环境配置
点击新建,分辨把platform-tools和tools文件夹添加进去,%ANDROID_HOME%表示前面的C:/SDK路径的缩写,也就是咱们刚才配置好的SDK变量,然后在后面里面对应的子文件夹,注意后面的分隔符是反斜杠(\)...原创 2021-01-27 10:31:15 · 1752 阅读 · 0 评论 -
Unity 播放带alpha通道的视频(Video Player组件)
通常是 .webm类型文件!!!!!使用工具:ffmpeg.exe将序列帧图片转换生成 .webm视频文件!!!!安装 ffmpeg.exe 下载链接: https://pan.baidu.com/s/1UUBEPYV7ql7WXJrj5tA35Q 提取码: 6cn4操作流程然后执行 转换的命令:ffmpeg.exe -i png/B_%5d.png -auto-alt-ref 0 -c:v libvpx export.webm...原创 2020-12-16 18:29:14 · 952 阅读 · 1 评论 -
UGUI显示Kinect摄像头拍摄内容
首先挂载俩脚本KinectManagerJointOverlayer// KinectManager需要勾选Compute Color Map。修改JointOverlayer脚本using UnityEngine;using System.Collections;using UnityEngine.UI;//using Windows.Kinect;public class JointOverlayer : MonoBehaviour { [Tooltip("G.原创 2020-08-27 13:07:33 · 261 阅读 · 0 评论 -
Material.SetTextureOffset 设置纹理偏移
using System.Collections;using System.Collections.Generic;using UnityEngine;public class AAAAAA : MonoBehaviour { float FFF; // Use this for initialization void Start () { } // Update is called once per frame void Update () { F.原创 2020-08-06 10:01:30 · 810 阅读 · 0 评论 -
unity3d 摄像机近地面清楚,远地面模糊
设置方法选中贴图 在属性面板,拖动Aniso Level的值从0~9改变,值越大贴图越清晰,但是消耗也变大,文档说会造成显卡消耗,一般只用在地面上,其他地方没必要原创 2020-06-29 17:41:46 · 3294 阅读 · 0 评论 -
unity ugui改变pos,width,height
1.改变RectTransform的topGetComponent<RectTransform>().offsetMax = new Vector2(GetComponent<RectTransform>().offsetMax.x, top); 2.改变RectTransform的bottomGetComponent<RectTransform>().offsetMin = new Vector2(GetComponent<RectTransfo.转载 2020-05-27 11:46:51 · 3045 阅读 · 1 评论 -
Unity接入百度语音识别WebAPI hh5460
第一步,布局如图第二步,代码如下 (自行填写apiKey和secretKey)using System;using System.Collections;using System.Text.RegularExpressions;using UnityEngine;using UnityEngine.EventSystems;using UnityEngine.Network...转载 2020-03-31 10:39:49 · 279 阅读 · 0 评论 -
ScrollRect--V
using System.Collections;using UnityEngine.UI;using UnityEngine.EventSystems;using System.Collections.Generic;using System;using UnityEngine;/// <summary> /// 略知CSharp http://blog.csdn....原创 2019-10-14 17:07:38 · 181 阅读 · 0 评论 -
Unity上传图片,返回JSON类型数据,解JSON
using UnityEngine;using System.Collections;using System.Net.Sockets;using System.Net;using System.Text;using System;using System.Timers;using System.IO;using UnityEngine.UI;[System.Serializ...原创 2018-09-05 16:14:17 · 927 阅读 · 0 评论 -
unity 大量物体拖拽进集合小窍门
首先要锁定,按shift选中拖拽进原创 2017-07-05 10:46:39 · 1127 阅读 · 4 评论