自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 字符串拼接优化

using System.Collections;using System.Collections.Generic;using System.Text;using UnityEngine;public class CSStringBuilder{ public static CSStringBuilder CS { get; set; } = new CSStringBuilder(); public StringBuilder sb = new StringBuilder(10

2020-11-12 15:13:56 119

原创 事件管理

using System.Collections;using System.Collections.Generic;using UnityEngine;public class BaseEvent{ //委托 public delegate void CallBack(uint id, params object[] objs); //事件集合 Dictionary<uint, EventHandler> eventDic = new Dictionar

2020-11-12 14:49:08 100

转载 关于unity中图片的压缩格式

unityAPI有详细的解释(官方中文版)特定于平台的覆盖的纹理压缩格式(TextureImporterOverride)

2019-09-12 16:29:48 318

转载 NGUI渲染流程(博客分享)

博客地址NGUI渲染流程

2019-09-05 17:40:52 162

转载 Unity内存(发现一篇很好地博客,分享一下)

博客地址:添加链接描述

2019-09-05 11:12:56 294

转载 帧同步(转载)

https://mp.weixin.qq.com/s?__biz=MzA5ODExMTkwMA==&mid=2650255562&idx=1&sn=a457e6dbf7bdd99d1e75dbf7e500dd44&scene=0#wechat_redirect?ref=myread

2019-09-02 17:51:05 130

原创 shaderUI特效,图片表面显示光柱(主要用于UI按钮简单特效)

Shader "FlowLight"{ Properties { _MainTex ("Base (RGB)", 2D) = "white" {} _FlashColor ("Flash Color", Color) = (1,1,1,1) _Angle ("Flash Angle", Range(0, 180)) = 45 _W...

2019-09-02 13:42:41 895

原创 Shader 使图片围绕自己中心旋转(主要是用于旋转的loading界面)

Shader "LoadingImage"{ Properties { _MainTex ("Texture", 2D) = "white" {} _Speed ("Speed",float) = 2 } SubShader { // No culling or depth //Cull Off ZWrite Off ZTest Always T...

2019-09-02 13:33:31 939

转载 关于LayerMask的解释

https://blog.csdn.net/qq_34562355/article/details/91876362

2019-08-26 17:26:48 249

原创 Unity官网中文API地址

https://connect.unity.com/doc/Manual/SL-PlatformDifferences

2019-08-09 17:43:36 3157

转载 关于Unity发布苹果并真机测试的设置与连接

https://www.jianshu.com/p/ec7f7e10add5

2019-08-09 17:41:55 595

转载 unity与Andorid交互,andoridStuido导出纯净jar包

https://www.jianshu.com/p/8256c0da444a

2019-08-07 10:57:53 90

转载 tolua解析json中的null

https://www.jianshu.com/p/886af98d0236

2019-08-07 10:48:07 563

转载 tolua 判断对象是否为空

https://blog.csdn.net/baidu_39447417/article/details/80001371

2019-08-07 10:44:51 504

转载 lua require加载机制以及卸载已经require的模块

require加载机制https://www.cnblogs.com/softidea/p/5242941.html卸载已经require的模块https://blog.csdn.net/qq_28412897/article/details/82883133

2019-08-07 10:39:12 3540

原创 修改文件名字(这里只是将文件夹的名字添加到文件中,只适用于编辑器模式下)

项目中需要大量修改名字,网上大部分代码都是通过File.Move()函数修改,在实际运用的时候总是报各种IO异常,所以利用了另外一种方法原理:先通过字符拼接生成新名字的文件,再将原文件的数据写入到新文件中,然后再删除新文件,可以达到修改文件名的目的说明:string s = fl.Replace(@"\", "/"); string d= dir.Replace(@"\", "/");这两段代...

2019-07-11 18:03:05 809

原创 通过输入ab包名和后缀名自动添加或修改ab包名(同一文件夹下的所有文夹都会被修改包括子文件夹)

using System.Collections;using System.Collections.Generic;using System.IO;using UnityEditor;using UnityEngine;public class SetGoAssertBundleName : EditorWindow { //文件夹名字 string DictorNa...

2019-07-10 17:08:04 1534 1

原创 shader 入门精要代码以及部分方法的底层实现 1_漫反射

Shader "Custom/_MyDiffuse" { Properties{ _DiffuseColor("Color",Color)=(1,1,1,1)//漫反射强度 } SubShader { Tags { "LightMode=ForwardBase" } CGPROGRAM fixed4 _DiffuseColor; #include "Lightin...

2019-07-05 15:46:02 224

原创 关于lua实现面向对象,实现数据分离

类的实现之前一直在看菜鸟教程的lua面向对象,发现并不能应用到实际开发中,最主要的原因是没能实现数据分离,所有的类都是基于同一个属性,修改其中的一个属性会改变其他所有类的属性,下面是菜鸟教程笔记中的例子Rectangle = {area = 0, length = 0, breadth = 0}function Rectangle:new (o,length,breadth) o = ...

2019-06-24 17:14:15 202

原创 shader 固定取值

渐变法线 fixed halfLambert = 0.5 * dot(worldNormal, worldLightDir) + 0.5;//半兰伯特光照模型 fixed3 diffuseColor = tex2D(_RampTex, fixed2(halfLambert, halfLambert)).rgb*_Color.rgb;//通过半兰伯特光照模型对渐变法线取值...

2019-06-03 13:41:36 257

原创 UnityShader入门精要知识点(方便以后查找)

Unity透视投影矩阵公式(列矩阵):Unity正交投影矩阵公式(列矩阵):屏幕映射:书籍

2019-05-20 15:42:12 163

原创 3D数学基本公式

3D旋转:在这里插入图片描述缩放:投影:镜像:切变:

2019-05-20 14:42:34 2576

转载 unity底层c#源码

链接地址 https://github.com/Unity-Technologies/UnityCsReference

2019-03-06 18:22:51 2949

转载 棋牌类游戏利用字节表示卡牌(仅扑克牌)

#region 成员变量和枚举 public enum CardType { None = 0, WuShiK = 1, Single = 2, Double = 3, Three = 4, Boom = 5, KingBoom = 6, King ...

2019-03-06 17:44:09 1024

转载 unity资源管理帮助

public class ABInfo : Component{ private int refCount; public string Name { get; } public int RefCount { get { return this.refCount; } set { //Log.Debug($"{this.Name} refcount: {...

2019-03-06 17:36:52 258

原创 时间类(unix)(Timer)(c#)

public static class Timer{ public static long Seconds() { return DateTimeOffset.Now.ToUnixTimeSeconds(); } public static long Milliseconds() { return DateTime...

2019-03-06 17:18:53 371

原创 unity编译器打包类(BuildEditor)

public class BundleInfo{ public List&lt;string&gt; ParentPaths = new List&lt;string&gt;();}public enum PlatformType{ None, Android, IOS, PC, MacOS,}public enum BuildType{ Development,...

2019-03-06 17:05:46 1581

原创 unity打包帮助类(BuildHelper)(c#)

public static class BuildHelper{private const string relativeDirPrefix = “…/Release”;public static string BuildFolder = “…/Release/{0}/StreamingAssets/”; public static void Build(PlatformType type...

2019-03-06 16:59:55 420

原创 版本信息(VersionConfig)(c#)

public class FileVersionInfo{public string File;public string MD5;public long Size;}public class VersionConfig : Object{ public int Version; public long TotalSize; [BsonIgnore] public D...

2019-03-06 16:56:12 608

原创 unity编译器资源帮助类(EditorResHelper)(c#)

FileHelper为博客中另一个文件帮助类public class EditorResHelper{/// /// 获取文件夹内所有的预制跟场景路径/// /// 源文件夹/// 是否获取子文件夹/// public static List GetPrefabsAndScenes(string srcPath){List paths = new List();F...

2019-03-06 16:51:55 365

原创 文件md5值的获取(MD5Helper)(c#)

获取文件md5的值public static string FileMD5(string filePath) { byte[] retVal; using (FileStream file = new FileStream(filePath, FileMode.Open)) { MD5 md5 = new MD5CryptoServiceP...

2019-03-06 16:40:21 602

原创 unity强制刷新布局

LayoutRebuilder.ForceRebuildLayoutImmediate(“传入RectTransform组件”);

2019-03-06 16:39:31 3338

转载 文件帮助类(FileHelper)(c#)

public static class FileHelper{//得到目录下所有的文件public static void GetAllFiles(List files, string dir){string[] fls = Directory.GetFiles(dir);foreach (string fl in fls){files.Add(fl);}string[] su...

2019-03-06 16:39:18 1312

空空如也

空空如也

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

TA关注的人

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