自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(29)
  • 资源 (6)
  • 收藏
  • 关注

原创 (CRON) info (No MTA installed, discarding output)

(CRON) info (No MTA installed, discarding output)

2023-03-23 10:27:31 1019

原创 Unity 监听Button interactable

Unity 监听Button interactable

2023-02-23 13:28:39 588

原创 Unity 编辑器使用InitializeOnLoad, 出现Menu xxx can‘t be checked because it doesn‘t exist

Unity 编辑器使用InitializeOnLoad, 出现Menu xxx can't be checked because it doesn't exist

2023-02-20 22:39:37 215

原创 Unity editor利用SerializedObject序列化List

在编辑器自定义窗口中进行序列化列表。

2022-08-06 13:01:47 1779

原创 Cmder command group {cmd} not found

Cmder command group {cmd} not found问题使用Cmder时,注册右键菜单后,打开后提示找不到{cmd}命令,只能重新选择想要执行的命令。解决在设置界面中,找到任务,将默认注册右键菜单中的{cmd}替换为任务名(例如 {cmd::cmder}),点击注册...

2022-05-09 10:42:25 449

原创 白鹭egret接入facebook广告

白鹭egret接入facebook广告问题一:打包后,找不到FBInstant对象按照文档,在index.html中插入script后,打包上传后找不到FBInstant,查看network后发现压根没有下载fbinstant.7.0.js<script src="https://www.facebook.com/assets.php/en_US/fbinstant.7.0.js"></script>解决:需要在template/web/index.html中的header

2022-03-07 21:03:49 251

原创 Unity Animation设置动画播放初始时间

Unity Animation设置动画播放初始时间需求在需要播放动作时, 从动作序列帧指定位置开始播放实现在指定位置等待播放public Animation animation;void Start(){ // 默认动作 var animationState = animation[animation.clip.name]; animationState.time = 5f; animationState.speed = 0f;

2022-02-17 19:54:37 6084

原创 UnityHub无法添加模块

UnityHub无法添加模块问题重新安装UnityHub后, 无法为unity安装模块解决一定要确保之前安装的路径是UnityHub默认安装路径 (D://路径/2019.4.30f1)将对应Unity版本从Hub移除后, 在Unity官网找到对应版本后, 选择使用UnityHub安装, UnityHub会直接使用本地文件添加Unity版本...

2021-11-17 17:15:43 4270 2

原创 Unity Socket远程建立连接异常问题

Unity Socket远程建立连接异常问题问题Socket连接远程服务器异常c#代码如下:iPEndPoint = new IPEndPoint(IPAddress.Parse("远程服务器地址"), port);socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);socket.Bind(iPEndPoint);解决bind方法用于局域网内建立连接, 使用Connect方

2021-10-20 10:37:05 1757

原创 python matplotlib画图

python matplotlib画图sin函数import numpy as npimport matplotlib.pyplot as pltimport matplotlib# 使用窗口matplotlib.use("TKAgg")# 创建图像fig = plt.figure()# x取值范围# np.linspace参数, start开始位置, stop结束位置, num点数x = np.linspace(-2 * np.pi, 2 * np.pi, 1000)y = np

2021-08-23 15:12:50 115

原创 vue-router 在当前界面监听路由变化

vue-router 在当前界面监听路由变化问题在页面中, 需要在路由变化时, 使用对应的component, 并且使用对应数据解决<router-view v-slot="{ Component }" :key="key"> <component :is="Component"></component></router-view>computed: { // 路由修改时, 方法执行 key() { console.log

2021-08-21 09:42:20 726

原创 axios使用get请求下载资源

axios使用get请求下载资源问题下载类似这种非静态文件资源地址时, 需要将axios默认的响应类型进行修改, 在获取到数据后写入文件https://xxx.xxx/download解决let resUrl: string = "https://xxx.xxx/download"axios.create({ timeout: 3000, responseType: "blob", // 响应类型, 将响应数据转换为二进制数据 headers: {},

2021-08-21 09:30:51 2246

原创 Git使用代理时无法clone出现超时

Git使用代理时无法clone出现超时问题在网络正常是,使用代理,git clone 仓库时,会出现连接超时错误解决设置git使用代理git config --global http.proxy "localhost:代理端口"

2021-07-31 16:53:50 851 1

原创 Vue webpack打包去除console.log

Vue webpack打包去除log需求在生产环境中, 不显示console.log函数解决在vue.config.js文件中, 添加webpack配置函数, 设置drop_console会忽略掉所有console.*函数module.exports = { configureWebpack(config) { // 是否生产环境 if (process.env.NODE_ENV === "production") { // 忽略输出 Pass true to dis

2021-06-09 10:21:21 1525

原创 h5 下载文件

h5 下载文件需求点击按钮, 进行下载文件最开始使用这种方法, 但是会打开空白页window.open("下载地址");解决export function downloadFile(fileUrl, fileName = "") { const a = document.createElement("a"); // 下载链接 a.setAttribute("href", fileUrl); // 文件名, 为""时使用链接中的文件名 a.setAttribute("down

2021-06-03 15:09:00 422

原创 h5 input清空files

h5 input清空files需求使用input的change回调, 选中A文件, 再次选中A文件回调不会执行, 为了解决此问题, 清空input中的files解决removeFiles() { const dt = new DataTransfer() const input = document.getElementById('input') input.files = dt.files}...

2021-06-03 15:02:12 414

原创 Vue使用脚手架创建项目

安装vue脚手架npm install -g @vue/cli使用脚手架创建项目vue create my-project

2021-05-21 10:07:58 49

原创 element-ui css样式穿透问题

css 样式穿透需求想要对公用组件修改样式, 使用scoped属性不会进行样式覆盖解决使用/deep/<style scoped>.class /deep/ .button { width: 100%;}</style>也可以使用 >>>在less, sass, scss中无法识别/deep/<style scoped>.class >>> .button { width: 100%;}</sty

2021-05-21 10:03:33 2076

原创 git-lfs 提交 EOF问题

git-lfs 提交 EOF问题问题环境: 局域网环境下Windows文件服务器在使用git大文件管理的方式提交时, 出现EOF错误解决将git路径修改为// 原先使用的路径//192.168.0.1/project/xx.git// 修改后的路径file:////192.168.0.1/project/xx.git参考https://github.com/git-lfs/git-lfs/issues/4391...

2021-05-06 17:01:19 523

原创 git-lfs 跟踪文件夹

git-lfs 跟踪文件夹需求使用git大文件管理方式, 跟踪文件夹中的所有文件解决// 忽略文件夹中的所有文件(包含文件夹)git lfs track "dir/**"// 忽略文件夹中的文件(不包含文件夹)git lfs track "dir/*"...

2021-05-06 16:21:21 3853 1

原创 Unity 编辑器代码打开场景

Unity 编辑器代码打开场景需求在编辑器下, 重新打开当前场景注意: 如果没有保存场景, 不会进行保存解决public static void ReLoadNowScene(){ // 使用到的命名空间 // using UnityEditor.SceneManagement; // using UnityEngine.SceneManagement; Scene scene = EditorSceneManager.GetActiveSce

2021-04-26 15:55:46 1503 1

原创 Unity 批量修改预制体的材质贴图Generate Mip Maps勾选状态

Unity 批量修改预制体的材质贴图Generate Mip Maps勾选状态需求编辑器下批量模型贴图的Generate Mip Maps的勾选状态解决获取预制体的MeshRenderer上的材质球获取材质球上的texture并得到texture资源路径利用TextureImpoter修改贴图选项并保存public static void ModelDisableGenerateMipMaps(){ FileInfo[] fs = new DirectoryInfo(p

2021-04-22 14:47:54 1969

原创 中国天气网城市代码

中国天气网城市代码获取地址https://j.i8tq.com/weather2020/search/city.js部分城市代码{ "北京": { "北京": { "北京": { "AREAID": "101010100", "NAMECN": "北京" }, "海淀": { "AREAID": "101010

2021-04-20 20:21:13 842

原创 Unity 鼠标拖拽控制旋转物体

Unity 鼠标拖拽控制旋转物体需求鼠标左键拖拽, 控制物体旋转摄像机固定不动, 可以使用下面的代码, 但是当摄像机移动到物体背后时, 出现拖拽旋转方向与摄像机在正面时相反的问题gameObj.transform.Rotate(transform.up, -mPosDelta.x, Space.World);gameObj.transform.Rotate(transform.right, mPosDelta.y, Space.World);解决gameObj.transform.Rotat

2021-04-19 20:25:48 2754

原创 Unity Editor监听脚本编译

Unity Editor监听脚本编译并使用回调需求创建脚本后, 向gameObject添加该脚本组件解决思路: 利用Unity Editor的回调DidReloadScripts, 使用反射进行调用创建监听脚本, 将其放入Editor文件夹(如果没有, 则创建Editor文件夹)using UnityEditor.Callbacks;using UnityEngine;using System;public class ListenScriptLoad { [DidReloadS

2021-04-16 20:05:15 1043

原创 Unity 批量修改fbx模型Read/Write Enabled勾选状态

Unity 批量修改fbx模型Read/Write Enabled勾选状态需求编辑器下批量修改fbx模型Read/Write Enabled勾选状态public static void ModifyMeshReadable() { FileInfo[] files = new DirectoryInfo(modelPath).GetFiles("*.FBX", SearchOption.AllDirectories); for (int i = 0; i &

2021-04-15 16:36:04 4764 1

原创 Unity 判断物体是否勾选static

Unity 判断物体是否勾选static需求判断GameObject是否勾选static最开始的判断方式为if (gameObject.isStatic) {}在编辑器模式下, 运行没有问题, 但是打包后, 无法使用。查看接口, 发现只能在编辑器下使用//// 摘要:// Gets and sets the GameObject's StaticEditorFlags.public bool isStatic { get; set; }解决目前通过判断物体的材质是否静态

2021-04-14 19:55:20 1126

原创 C# 字符串格式化包含{}字符导致异常报错

C# 字符串格式化需求在字符串格式化的时候包含{}字符时, 会发生报错格式化异常代码:string.Format("{\"type1\":{0},\"type2\":{1},\"type3\":{2}}", "1", "2", "3");报错内容:System.FormatException: Input string was not in a correct format.解决对于{content, {0}}这种嵌套格式, 需要{{content , {0}}}string.Form

2021-04-13 20:15:31 465

原创 删除MySQL表中的数据

删除MySQL表中的数据需求解决删除所有数据, 保留表的结构删除整个表, 不保留表结构需求只删除表中的数据, 不删除表的结构解决执行命令删除所有数据, 保留表的结构truncate table 表名;删除整个表, 不保留表结构delete table 表名;...

2021-04-13 20:03:18 91

Python 获取天气代码

python3以上版本, requests模块, 城市天气, 指数, 预警, 需要替换对应城市代码

2022-09-29

TextMesh Pro - Release 1.0.56.56.0b2 (dll only)

unity5.6版本使用

2022-02-17

vue3中使用threejs加载fbx模型.zip

vue3中使用threejs加载fbx模型, 首先需要npm install three, 并且threejs场景正常

2021-07-04

中国天气网城市代码json

中国天气网城市代码json文件

2021-04-20

mysql-connector-java-5.1.41-bin.jar

mysql-connector-java-5.1.41-bin.jar 驱动

2017-06-18

Python网络数据采集

2017-03-26

空空如也

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

TA关注的人

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