C#调用Lua函数

作者:追风剑情 发布于:2018-3-7 16:22 分类:Lua

示例 配置CodeGenConfig.cs using UnityEngine; using System; using System.Collections; using XLua; public class CSharpCallLuaTest : MonoBehaviour { private string luascr...

阅读全文>>

标签: xLua

评论(0) 浏览(6448)

快速傅里叶算法(FFT)示例

作者:追风剑情 发布于:2018-2-23 18:25 分类:Algorithms

连续非周期信号的傅里叶变换公式 (公式中的i是虚数单位) 现在假设在x(t)的某一段连续区间上以周期T进行采样,得到N个采样点,则每个采样点的离散傅里叶变换公式就是: (n=0,1,...,N-1) 令,则上式可简单记为: (n=0,1,...,N-1) 上式可用线性方程组表示为: for (int n...

阅读全文>>

标签: Algorithms

评论(0) 浏览(7876)

Lnaguage Intergrated Query(Linq) 集成查询语言

作者:追风剑情 发布于:2018-2-22 15:27 分类:C#

示例一 官方文档 https://docs.microsoft.com/zh-cn/dotnet/csharp/language-reference/keywords/query-keywords using System; using System.Collections.Generic; using System.Linq; using System.Text...

阅读全文>>

标签: C#

评论(0) 浏览(5757)

IFormatProvider、ICustomFormatter、IFormattable

作者:追风剑情 发布于:2018-2-1 20:48 分类:C#

示例: 定制格式化器 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Threading; namespace Test5 { class Progra...

阅读全文>>

标签: C#

评论(0) 浏览(14388)

自动生成图集

作者:追风剑情 发布于:2018-1-30 11:04 分类:Unity3d

示例代码 using UnityEngine; using UnityEditor; using System.IO; using System.Collections; using System.Collections.Generic; public class MenuEditor { [MenuItem("Tools/Generate Atlas")] ...

阅读全文>>

标签: Unity3d

评论(0) 浏览(6677)

自定义头像

作者:追风剑情 发布于:2018-1-29 15:16 分类:Android

让玩家通过从相册选择照片或拍照来制作自己的头像 以下为demo AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" pac...

阅读全文>>

标签: Android

评论(0) 浏览(7173)

GC.SuppressFinalize()

作者:追风剑情 发布于:2018-1-23 16:49 分类:C#

示例 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Test9 { class Program { static void Mai...

阅读全文>>

标签: C#

评论(0) 浏览(5358)

xLua——动态热更(三)

作者:追风剑情 发布于:2018-1-16 18:09 分类:Lua

示例 HotfixSystem.cs using UnityEngine; using System.Text; using System.Collections; using XLua; namespace Hotfix { [Hotfix] public class HotfixSystem : MonoBehaviour {...

阅读全文>>

标签: xLua

评论(0) 浏览(6040)

xLua——动态热更(二)

作者:追风剑情 发布于:2018-1-15 21:53 分类:C#

示例 using UnityEngine; using System.Collections; using XLua; namespace Hotfix { [Hotfix] public class LuaManager : MonoBehaviour { private LuaEnv luaenv; priva...

阅读全文>>

标签: C#

评论(0) 浏览(6927)

Assembly.GetExecutingAssembly()

作者:追风剑情 发布于:2018-1-15 18:05 分类:C#

示例 using UnityEngine; using System; using System.Linq; using System.Reflection; using System.Collections; using System.Collections.Generic; namespace my_test { public class Test1 : M...

阅读全文>>

标签: C#

评论(0) 浏览(4917)

PropertyModification

作者:追风剑情 发布于:2018-1-12 14:05 分类:Unity3d

利用PropertyModification,在Prefab中保存额外属性信息。 示例 using UnityEngine; using UnityEditor; using System; using System.IO; using System.Collections; public class MenuEditor { [MenuItem(...

阅读全文>>

标签: Unity3d

评论(0) 浏览(7633)

计算几何

作者:追风剑情 发布于:2018-1-7 14:16 分类:Algorithms

示例代码 using System; using System.Collections.Generic; namespace Geometry { /// <summary> /// 计算几何类 /// 封装了计算几何的基本算法: /// 点与矩形的关系、点与圆的关系、点与直线的关系、直线与直线的关系、点与多边形的关系 ...

阅读全文>>

标签: Algorithms

评论(0) 浏览(5993)

自定义Hierarchy中的对象排序——BaseHierarchySort

作者:追风剑情 发布于:2017-12-29 13:58 分类:Unity3d

开启Hierarchy排序(Edit->preferences->General) 勾上Enable Alpha Numeric Sorting 示例(必须放在Editor文件夹下) using UnityEngine; using UnityEditor; using System.Collections; /// <sum...

阅读全文>>

标签: Unity3d

评论(0) 浏览(56175)

ListView

作者:追风剑情 发布于:2017-12-28 17:35 分类:C#

示例 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks;...

阅读全文>>

标签: C#

评论(0) 浏览(4651)

获取对象的预览图——AssetPreview.GetAssetPreview()

作者:追风剑情 发布于:2017-12-27 17:49 分类:Unity3d

获取对象的预览图 示例代码 using UnityEngine; using UnityEditor; using System.Collections; public class AssetPreviewWindow : EditorWindow { [MenuItem("Example/AssetPreviewWindow")] ...

阅读全文>>

标签: Unity3d

评论(0) 浏览(9409)

EditorGUIUtility.Load()

作者:追风剑情 发布于:2017-12-27 11:47 分类:Unity3d

先来看看这个方法的实现(可通过ILSpy反编译UnityEngine.dll查看源码) // UnityEditor.EditorGUIUtility [TypeInferenceRule(TypeInferenceRules.TypeReferencedBySecondArgument)] private static UnityEngine.Object Load(string ...

阅读全文>>

标签: Unity3d

评论(0) 浏览(4868)

提取Unity内置资源图标

作者:追风剑情 发布于:2017-12-27 11:37 分类:Unity3d

参考 http://blog.csdn.net/warrenmondeville/article/details/53247181 示例代码 using UnityEngine; using UnityEditor; using System; using System.Collections; using System.Reflection; ...

阅读全文>>

标签: Unity3d

评论(0) 浏览(7001)

PopupWindowContent

作者:追风剑情 发布于:2017-12-26 16:44 分类:Unity3d

自定义弹出菜单 PopupExample.cs using UnityEngine; using UnityEditor; using System.Collections; public class PopupExample : PopupWindowContent { bool toggle1 = true; bool toggl...

阅读全文>>

标签: Unity3d

评论(0) 浏览(5257)

选择对象——EditorGUIUtility.ShowObjectPicker()

作者:追风剑情 发布于:2017-12-25 21:45 分类:Unity3d

TestInspector.cs using UnityEngine; using UnityEditor; using System.Collections; [CustomEditor(typeof(Test))] public class TestInspector : Editor { Test test; bool toggleGr...

阅读全文>>

标签: Unity3d

评论(0) 浏览(14423)

DecoratorDrawer

作者:追风剑情 发布于:2017-12-25 17:39 分类:Unity3d

工程截图 示例代码 Range1DecoratorDrawer.cs using UnityEngine; using UnityEditor; using System.Collections; //自定义特性的装饰属性样式 [CustomPropertyDrawer(typeof(Range1Attribute))] public ...

阅读全文>>

标签: Unity3d

评论(0) 浏览(4646)

PropertyDrawer

作者:追风剑情 发布于:2017-12-25 17:32 分类:Unity3d

工程截图 示例代码 Range1PropertyDrawer.cs using UnityEngine; using UnityEditor; using System.Collections; //自定义特性属性样式 [CustomPropertyDrawer(typeof(Range1Attribute))] publi...

阅读全文>>

标签: Unity3d

评论(0) 浏览(4765)

获取深度和法线纹理的原理

作者:追风剑情 发布于:2017-12-23 12:07 分类:Shader

原理       深度纹理实际就是一张渲染纹理,只不过它里面存储的像素值不是颜色值,而是一个高精度的深度值。由于被存储在一张纹理中,深度纹理的深度值范围是[0, 1],而且通常是非线性分布的。这些值来自于顶点变换后得到的归一化的设备坐标(Normalized Device Coordinates, NDC)。在得到NDC后,深度纹理中的像素值就可以很方便地...

阅读全文>>

标签: Shader

评论(0) 浏览(5379)

Powered by emlog  蜀ICP备18021003号-1   sitemap

川公网安备 51019002001593号