自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

原创 unity 检测移动硬盘盘符

获取所有硬盘盘符(C,D,E,F)string[] drives = Directory.GetLogicalDrives();foreach (string drive in drives){Debug.LogError($“drive----------------- :{drive }”);}获取所有硬盘盘符, 以及类型在unity 2019 有效, 其他版本未测试 DriveInfo[] allDrives = DriveInfo.GetDrives(); foreac

2021-08-23 09:55:33 1236

原创 Unity windows 10 非平板模式下, 使用 TapTip.exe 平板软键盘, 可切换中英文

参考:在Windows 10周年纪念版中显示触摸键盘(TabTip.exe)(Show touch keyboard (TabTip.exe) in Windows 10 Anniversary edition)代码如下:VirtualKeyboard.cspublic class VirtualKeyboard{ public static void ShowKeyboard() { var uiHostNoLaunch = new UIHostN...

2021-05-20 16:27:47 1865

原创 unity 读写Json 配置文件

using System.Collections.Generic;using System.IO;using Newtonsoft.Json;using Newtonsoft.Json.Linq;public class ComponentConfig{ public static QualityLevel qualityLevel = QualityLevel.Perfect; // 设置质量(默认最高) public static bool FullScreen = tr.

2020-12-15 11:25:38 1197

原创 Library\PackageCache\com.unity Error (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.unity.cinemachine@2.2.7\Runtime\Timeline\CinemachineTrack.cs(16,6): error CS0246: The type or namespace name 'TrackColor' could not be found (are you missing a using directive or an assembly reference?)总结全网方案:方案一:删除unity 编辑器缓存:

2020-10-13 10:08:34 12766 7

原创 unity 点击获取屏幕中图片像素的颜色

/// <summary> /// 获取屏幕点击贴图像素位置 /// 点击屏幕 点击到图片,计算图片的像素坐标(图片的屏幕像素范围(宽高),屏幕坐标到图片像素坐标的转换) 获取颜色 /// </summary> /// <param name="screenPosition">屏幕坐标</param> /// <param name="rectT">图片位置</param> /// ..

2020-07-24 18:10:08 2769 1

原创 Unity Lighting Window 属性的序列化与反序列化

由于业务场景存在 光照环境设置的移植,所以对光照所有属性做读写操作,整合成工具。序列化 Scriptable 对象的属性名称与Lighting 窗口面板上的名称大体相同,属性顺序除逻辑需求外,大体相同。如果要改动某一属性值,也可作为参考。编辑器工具类:LightingSetting.csusing System.IO;using UnityEngine;using UnityEditor;using UnityEngine.Rendering;using Object = Un

2020-07-16 18:23:20 398 1

原创 siki UIFramework完善, 增加 panel 页面间的数据传递方法

原版参考链接:https://blog.csdn.net/qq_34937637/article/details/80374387由于原版 UIFramework ,只有页面间的跳转以及 OnEnter 、OnExit 等4个方法 。所以,参考前端的页面 Content 上下文数据的传递方式在页面跳转时,增加数据传递:UIManager.cs /// <summary> /// 跳转界面,如果界面存在,直接跳转,不存在创建,传递参数 /// &lt.

2020-06-05 14:13:30 194

原创 unity avPro player PC 版本 黑屏问题,有声音

unity avPro 视频播放,windows Unity_Editor 正常播放mac osx Unity_Editor 播放失败,自定义场景有声音无图像,demo场景声音图像都没有定位:组件使用问题:最初使用,熟练度不够组件本身平台不兼容组件本身 bug考虑过其他方案:更换其他插件 vlc 视频播放。 导入库版本版本不正常 unity2019 无法使用封装本身 unity组件。 太麻烦,又得整合封装,未定调用 mac 播放器 quickTime Playe.

2020-06-02 09:27:26 1465

原创 unity 任意局部区域截图 Texture2D.ReadPixels 解决ReadPixels outside of RenderTexture bounds! 问题

错误信息:[d3d11] attempting to ReadPixels outside of RenderTexture bounds! Reading (7000, 340, 8000, 740) from (1920, 1080)额,还是Texture2D.ReadPixels 参数问题:纯属手动调试推算,测试无误:IEnumerator getScreenTexture(R...

2019-07-18 12:00:35 7704 4

空空如也

空空如也

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

TA关注的人

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