- 博客(218)
- 资源 (5)
- 收藏
- 关注
原创 NewtonJson 自定义的JsonConverter用于自定义文本解析函数
先看一下Json的格式。要解析其中的时间戳字段,自带的Converter无法进行,只能自己创建所需的转换函数 { "id": 1384552022690369570, "machineId": 101, "msgCode": 80002, "startTime": 1618937902137, "endTime": 1618937915316, "createStartTime": 16189379005
2021-09-09 08:39:16
1790
原创 Unity中 Animation Clip中添加属性 被锁定 无法通过脚本修改
https://forum.unity.com/threads/animator-locking-animated-value-even-when-current-state-has-no-curves-keys-for-that-value.440363/以上链接并未解决问题,因为官方从12年到现在 都不觉得这是个问题。但是实际用的时候确实非常难受,clip中用到的属性,包括setactive ,enable, position等的修改 ,在其他地方都要用到。不被脚本修改 是不现实的。当前的方案是:
2021-07-23 12:50:29
1767
2
原创 如何使用Visual Studio 自带的 单元测试框架
参考链接https://docs.microsoft.com/zh-cn/visualstudio/test/getting-started-with-unit-testing?view=vs-2019&tabs=mstest1 在 Visual Studio 中,打开要测试的项目。2 在“解决方案资源管理器”中,选择解决方案节点。 然后,在顶部菜单栏中,选择“文件” > “添加” > “新项目” 。3 在新项目对话框中,找到要使用的测试框架的单元测试项目模板(如 MSTest)
2021-07-01 16:06:51
957
1
原创 blender动态石板制作
参考视频https://www.bilibili.com/video/av500667592/1.添加栅格随机选择(弃选)按Y 分离面 不新建图层,,Ctrl+E细分U 块状投影 -UV Editing界面全选 - S -0 缩放到最小添加一个纯轴 空物体给栅格添加修改器首先 UV偏移修改器全选 Ctrl+G 添加新定点组添加顶点权重编辑 修改器编辑文理使用空物体驱动栅格变化...
2021-06-11 10:53:42
245
1
原创 Unity 双指缩放脚本
using UnityEngine;using System.Collections;/// <summary>/// Found in /// http://unity3d.com/pt/learn/tutorials/modules/beginner/platform-specific/pinch-zoom/// Contains both perspective and orthographic stuff, in this 2D game we'll/// be usin
2021-05-28 14:26:28
498
原创 C++11 原生的多线程实例
from:https://en.cppreference.com/w/cpp/thread/async#include "stdafx.h"#include <iostream>#include <vector>#include <algorithm>#include <numeric>#include <future>#include <string>#include <mutex> std:
2021-05-08 22:59:24
208
原创 c# 模板方法 设计模式
一定要保证 有一个稳定的操作的骨架,对子类虚函数带来变化using System;namespace RefactoringGuru.DesignPatterns.TemplateMethod.Conceptual{ // The Abstract Class defines a template method that contains a skeleton of // some algorithm, composed of calls to (usually) abstra
2021-05-08 20:16:26
130
原创 C++ bitset
#include <QCoreApplication>#include<iostream>#include<string>#include<bitset>using namespace std;int main(int argc, char *argv[]){ std::bitset<4> foo1 (0xff1); std::bitset<4> foo (std::string("1001"));
2021-04-30 16:21:58
116
1
原创 Unity发布Webgl 文件夹下的配置文件读取问题
这是一个PC运行时的文件访问方式,判断有无并加载即可[Serializable]public class SanguConfig : BaseConfig{ public readonly string FileName = Application.dataPath + "/SanguConfig.json"; public SanguConfig() { var item = new IdleSanguConfig().CommandsMap;
2021-04-30 13:03:11
1964
原创 VS调试时 将控制台的打印信息重定向到本地文件
选择项目 右键 属性 调试选项 命令参数 >log.txt即可同样的操作也适用于 输入参数的时候,可以使用 < input.txt 即可
2021-04-29 15:54:32
2246
原创 C++单例模式中存在static instance资源什么时间被回收的问题
class CSingleton{private: CSingleton() //构造函数是私有的 { } static CSingleton *m_pInstance;public: static CSingleton * GetInstance() { if(m_pInstance == NULL) //判断是否第一次调用 m_pInstance = new CSingleton(); return m_pInstance; }};使用shared_prt来
2021-04-29 15:36:16
786
原创 Unity 脚本控制UI Panel的切换
以下对代码进行了注释,完整工程 在Asset Store 搜索 Unity UI Simple包含对动画的设置、状态判断 保存等using UnityEngine;using UnityEngine.UI;using UnityEngine.EventSystems;using System.Collections;using System.Collections.Generic;public class PanelManager : MonoBehaviour { /// <
2021-04-21 13:01:24
2379
原创 Unity UI 框架,整理Panel和Scene的部分
参考 https://www.bilibili.com/video/BV1Bz4y1D7rL?from=search&seid=5715495669300884846地址 https://gitee.com/friendlyA/XFramework.git
2021-04-21 11:00:17
349
原创 Unity 里的Json序列化
常用Json类JsonUtiltity: 只有 fromjson toJson两个方法可用,不能对类中的字典等复杂的字段序列化,功能很有限JsonSimple:改善一点点 ,但是还是不够使Newtonsoft:好很多,对字典可以很好 保存,对父类的公共字段也可以,所以以后主要用用这个哟...
2021-04-20 15:43:48
358
原创 Unity 动画状态机 动画结构形成一个环状,依次给相应的条件执行,最后回到循环最初
状态之间形成一个环,要做到按顺序执行后,回到Idle进行下一轮次的判断。问题出现在最后回到idle的transition处。为了让动画立即执行,所有transition取消了 “has exit time”这里要明确的概念是,中断的current state/next state 是对自身状态 和连线的下一个动画而言的current state 下Ordered Interruption 选中例如 A-B A-C A-D 这个顺序的转换A...
2021-04-15 16:28:11
619
原创 blender 布尔工具使用
ctrl + shift + num- --取差ctrl +shift + num+ --取并ctrl +shift + num* --取交ctrl +shift + num/ --切片切片效果交集效果
2021-04-14 15:57:17
6510
原创 Rabbtmq 主题模式
RabbitMq Topics模式讲解交换机的Fanout模式发送很多冗余的消息,Direct模式可以对消息进行精确的筛选,但因为匹配要求严格,不能给系统太多的自由。* (star) can substitute for exactly one word.# (hash) can substitute for zero or more words.生产者代码using System;using System.Linq;using RabbitMQ.Client;using System.T
2021-04-02 09:47:33
113
原创 RabbitMq Routing模式讲解
RabbitMq 路由模式 讲解前面讲到的 将交换机设置成fanout,进行消息广播的模式,对消息没有任何的控制,是一种简单无脑的模式,没法对消息进行过滤和控制步骤1 声明交换机时设置 交换机类型为directchannel.ExchangeDeclare(exchange: “direct_logs”, type: “direct”);2 发布消息到交换机时设置 routingKeyvar body = Encoding.UTF8.GetBytes(message);channel.Bas
2021-04-02 09:30:30
179
1
原创 2021-04-02
/* RabbitMq 发布者/订阅者模式一.1 producer 负责发布消息2 queue 负责存储转发消息3 consumer 负责订阅和消费消息二.1.生产者 不直接发送的消息给一个queue,甚至更多的时候 生产者 甚至不知道消息将被传递给队列生产者直接将消息发送给exchange.2.exchange交换机,一端接收消息 一端将消息push给队列交换机的工作模式1 direct2 topic3 headers4 fanout*/// 生产者的 代码using S
2021-04-02 09:16:41
83
原创 RabbitMQ Work Queue模式讲解
RabbitMQ Work Queue模式讲解一.W/Q 模式的结构有一个负责发送任务,多个执行单元接受任务后进行处理。该模式中,没个消费者接受的任务量是均衡的。不会根据具体任务的处理时间进行更精确的分配发布者代码var message = GetMessage(args);var body = Encoding.UTF8.GetBytes(message);var properties = channel.CreateBasicProperties();properties.Persisten
2021-04-02 08:38:30
221
1
原创 RabbitMq 简单模式
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;using System.Threading.Tasks;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Documents;usin
2021-03-29 16:35:54
82
原创 Unity 使用RabbitMq的工程
https://gitee.com/hhhhaxx/unity-rabbit-mq-test1 工程内包含了 所使用的 RabbitMq.Client.dll2 解决 发布程序 Null Reference Supported 的问题3 简单测试
2021-03-29 11:36:00
997
原创 Unity 使用RabbitMq导出应用程序后报错 NullReferenceException: Object reference not set to an instance of an obje
将以下位置修改成 .Net 4x
2021-03-29 11:10:14
458
原创 Git版本的回滚 和 向新版本切换
回滚的操作1.查看版本git branch -a2. git log --pretty=oneline3. git reset --hard ^HEAD 或者 git reset --hard 6f9sdsfv32以上操作回滚了本地的版本远程库要同步使用git push -f origin master(new)跳转到新版本,使用以下 查看所有的记录后再进行跳转查看所有的修改记录git log -g --pretty=onelinegit reset --hard 344422df
2021-03-25 16:13:42
246
原创 git新建分支 并和远程的同步,修改分支名称 ,删除分支,合并分支的操作
1.查看所有分支 git branch -a2.新建分支 git branch newbranch3.使用分支 git checkout newbranch4.修改文件5. git add .6. git commit -m "new branch added "7. git push -u origin newbranch8. 查看所有分支情况 git branch -a
2021-03-25 14:54:10
145
原创 git 添加一个文件夹的操作步骤
1.进入一个文件夹2.git init 初始化git3.git remote add origin http:// 222.11…1.1…1:testproject4.git pull http://222…5.git add .6.git commit -m “aaa”7.git push -u origin master
2021-03-25 14:42:40
1000
原创 C++ 位域的应用
#include <iostream> typedef unsigned int Bit;class File { Bit mode : 2; Bit modified : 1; Bit prot_owner : 3; Bit prot_group : 3; Bit prot_world : 3; int a;public: void modifiy() { modified = 1; mode = 1; } ..
2021-03-23 16:00:20
187
原创 blender 导出动画在unity 中添加
1.使用Bender记录关键帧的方式生成动画2.保存模型为unity支持的格式3.在 unity 中导入模型4. 在模型修改时选择 animation type 为legacy5.播放动画坐标回到blender中原点,这种,可以添加一个空白物体,然后将模型挂到底下,就可以 或者将不要将第一帧设为关键帧,然后导出6....
2021-03-12 15:57:24
4216
原创 C# 反射获得字段 和 修改字段的方法
usingSystem;usingSystem.Reflection; namespaceattributeTest{ [System.AttributeUsage(System.AttributeTargets.Class|System.AttributeTargets.Struct)]publicclassAuthorAttribute:System.Attribute{publicstringname{get;...
2021-03-12 12:40:30
759
很好的截图工具.rar
2020-07-17
Visio 2016 64bit.rar
2020-07-17
DragControlHelper.rar
2020-03-17
WpfApp4.rar
2020-01-23
MVS-1.0.0_x86_64.tar.gz
2019-12-24
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人