Occlusion Area

作者:追风剑情 发布于:2018-12-20 10:39 分类:Unity3d

工程截图 Scene窗口 遮挡物体设置为Occluder Static 被遮挡物体设置为Occludee Static 打开Window->Occlusion Culling 烘焙下 注意: 切换到Visualization标签才可在Scene窗口预览效果 参数翻译...

阅读全文>>

标签: Unity3d

评论(0) 浏览(4514)

LOD Group

作者:追风剑情 发布于:2018-12-19 20:42 分类:Unity3d

可以根据摄像机的远近来显示不同的模型(近显示精模,远显示简模) 工程截图 效果

阅读全文>>

标签: Unity3d

评论(0) 浏览(4657)

烘焙环境光遮蔽(Baked ambient occlusion)

作者:追风剑情 发布于:2018-12-19 17:04 分类:Unity3d

翻译参考 https://www.jianshu.com/p/22a3ca0b427f Max Distance 光线追踪距离 Indirect 控制AO影响间接光照的程度(值越大阴影越暗),只对AO应用间接光照将呈现更真实的效果。 Direct 控制AO影响直接光照的程度(值越大阴影越暗),默认情况下,AO不会影响直接光照。拖动该滑动条可以开启该功能。...

阅读全文>>

标签: Unity3d

评论(0) 浏览(5220)

裁剪UI区域

作者:追风剑情 发布于:2018-12-19 11:30 分类:Shader

Shader代码 Shader "Custom/UIClipTest" { Properties { [PerRendererData] _MainTex ("Texture", 2D) = "white" {} [Toggle(UNITY_UI_CLIP_RECT)] _UseUIClipRect ("Use Rect Clip", Float) = ...

阅读全文>>

标签: Shader

评论(0) 浏览(6188)

PropertyModification

作者:追风剑情 发布于:2018-12-18 10:55 分类:Unity3d

示例代码 [MenuItem("Assets/资源工具/Test", false, 100)] public static void Test() { //原文 https://blog.csdn.net/zgjllf1011/article/details/79304743 //保存自定义参数到.meta文件中 string path = AssetDatabase.G...

阅读全文>>

标签: Unity3d

评论(0) 浏览(4871)

4×4齐次矩阵

作者:追风剑情 发布于:2018-12-15 21:46 分类:Algorithms

4D齐次空间        4D向量有4个分量,前3个是标准的x,y和z分量,第四个是w,有时称作齐次坐标。        为了理解标准3D坐标是怎样扩展到4D坐标的,让我们先看一下2D中的齐次坐标,它的形式为(x,y,w)。想象在3D中w=1处的标准2D平面,实际的2D点(x,y)用齐次坐标...

阅读全文>>

标签: Algorithms

评论(0) 浏览(13814)

生成随机地形

作者:追风剑情 发布于:2018-12-15 18:36 分类:Unity3d

示例代码 using System.Collections; using System.Collections.Generic; using System.IO; using System; using UnityEngine; using UnityEditor; // 测试: 随机生成高度图 public class TestHeightmap : MonoBeha...

阅读全文>>

标签: Unity3d

评论(0) 浏览(6021)

视差贴图(Parallax Diffuse)

作者:追风剑情 发布于:2018-12-13 20:59 分类:Shader

shader代码 DefaultResourcesExtra文件夹下 Alpha-Parallax.shader // Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt) Shader "Legacy Shaders/Transparen...

阅读全文>>

标签: Shader

评论(0) 浏览(5972)

BuildPipeline.BuildPlayer()

作者:追风剑情 发布于:2018-12-12 18:32 分类:Unity3d

示例代码 // Build场景 public static void BuildScene(Object asset, string export_folder=null) { if (asset == null) return; string assetPath = AssetDatabase.GetAssetPath(asset); BuildScen...

阅读全文>>

标签: Unity3d

评论(0) 浏览(6503)

理解AssetBundle.Unload()

作者:追风剑情 发布于:2018-12-12 15:50 分类:Unity3d

官方文档 https://unity3d.com/cn/learn/tutorials/topics/best-practices/assetbundle-usage-patterns 示例代码 using System.Collections; using System.Collections.Generic; using UnityEngine; pub...

阅读全文>>

标签: Unity3d

评论(0) 浏览(6892)

代码设置AlwaysIncludedShaders

作者:追风剑情 发布于:2018-12-11 15:52 分类:Unity3d

示例 // 将shader加到AlwaysIncludedShaders public static void AlwaysIncludedShaders(Object folder) { if (folder == null) return; string folder_path = AssetDatabase.GetAssetPath(folder);...

阅读全文>>

标签: Unity3d

评论(0) 浏览(5642)

EditorApplication.projectWindowItemOnGUI

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

示例: 按住alt键显示资源后缀名 参考原文 https://www.cnblogs.com/Yellow0-0River/p/6513192.html using UnityEditor; using UnityEngine; using System.IO; using System.Reflection; using System.Text; using System; ...

阅读全文>>

标签: Unity3d

评论(0) 浏览(4968)

线性变换

作者:追风剑情 发布于:2018-12-9 16:01 分类:Algorithms

在数学上,如果满足下式,那么映射F(a)就是线性的: 以及        如果映射F保持了基本运算:加法和数量乘,那么就可以称该映射为线性的。在这种情况下,将两个向量相加然后再进行变换得到的结果和先分别进行变换再将变换后的向量相加得到的结果相同。同样,将一个向量数量乘再进行变换和先进行变换再数量乘的结果也是...

阅读全文>>

标签: Algorithms

评论(0) 浏览(4265)

位运算求绝对值

作者:追风剑情 发布于:2018-12-8 20:51 分类:Algorithms

示例 using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApp5 { class Program { static void Main(string[] args) ...

阅读全文>>

标签: Algorithms

评论(0) 浏览(4063)

分解FBX文件

作者:追风剑情 发布于:2018-12-7 18:33 分类:Unity3d

一、导入一个FBX文件 二、分解FBX文件 示例代码 using UnityEditor; using UnityEngine; using System.IO; using System.Collections; using System.Collections.Generic; pu...

阅读全文>>

标签: Unity3d

评论(0) 浏览(6130)

KeyValuePair<TKey, TValue>

作者:追风剑情 发布于:2018-12-4 11:44 分类:C#

示例 using System; using System.Collections.Generic; namespace Test3 { class Program { static void Main(string[] args) { KeyValuePair<string, int&...

阅读全文>>

标签: C#

评论(0) 浏览(3565)

一个简单的命令行解析工具类

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

示例代码 using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApp4 { class Program { static void Main(string[] args) ...

阅读全文>>

标签: C#

评论(0) 浏览(3490)

字符串首字母大小写转换

作者:追风剑情 发布于:2018-11-28 20:04 分类:C#

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

阅读全文>>

标签: C#

评论(0) 浏览(4802)

补位PadLeft()与PadRight()

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

示例 using System.Linq; using System.Text; using System.Threading.Tasks; using System.Reflection; namespace Test2 { class Program { static void Main(string[] args) ...

阅读全文>>

标签: C#

评论(0) 浏览(4114)

FieldInfo

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

示例一 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Reflection; namespace Test2 { class Program ...

阅读全文>>

标签: C#

评论(0) 浏览(4473)

AssetBundleManifest

作者:追风剑情 发布于:2018-11-24 0:23 分类:Unity3d

一、随便创建几个资源并设置AssetBundle名称和Variant名称 一、写个生成AssetBundles的菜单功能 using System.IO; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; ...

阅读全文>>

标签: Unity3d

评论(0) 浏览(7158)

C#分离Alpha通道图

作者:追风剑情 发布于:2018-11-23 18:27 分类:Unity3d

一、工程 示例代码 using System; using System.IO; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Drawing; using System.Drawing.Ima...

阅读全文>>

标签: Unity3d

评论(0) 浏览(5472)

Powered by emlog  蜀ICP备18021003号-1   sitemap

川公网安备 51019002001593号