我写了个editorWindow,其中有个成员变量m_x,在创建editorWindow的时候为m_x赋的值,而在editorWindow的OnGUI里把m_x显示出来. 当我开着这个editorWindow并点击unity的play按钮后,editorWindow中的数据丢失,即m_x变成null. 后来发现,原来是因为我把m_x定义成了static变量,如果改成非static变量,就好了.…
对于editorWindow,Time.deltaTime不起作用,所以需用下面方法对update进行计时: public class myEditorWindow : EditorWindow{ public float m_lastUpdateTime=0; public myEditorWindow(){        wantsMouseMove = true;    } public void Update(float dt){ //to do } private void Updat…
1.创建EditorWindow using UnityEditor; using UnityEngine; public class ZZEditorWindow : EditorWindow { [MenuItem("ZZTest/CreateWindows")] static void ZZTestCreateWindow() { ZZEditorWindow zzWindow = EditorWindow.GetWindow(typeof(ZZEditorWindow), fa…
一:功能 1.实例化 //设置插件在菜单栏的位置 和快捷键 [MenuItem("YCC's Tools/模型更改/更改父物体和测量长度 %W")] //实例化窗体 static void Init() { myTools window = (myTools)EditorWindow.GetWindow(typeof(myTools)); window.titleContent.text = "更改父物体/测长"; window.Show(); } 2.选项卡制作…
Note: While using this option you need to replicate the standard table into SAP HANA that is T005T, T005U, T009, and T009B. If these standard tables are not available then you will not be able use the “Generate Time Data” function.如果使用 “Generate Time…
在前面几节中反复出现了如下代码: svg.selectAll("rect") .data(dataset) .enter() .append("rect") 当所选择的 rect 数量比绑定的数据 dataset 的数量少的时候,通常会用到以上代码,这一节就详细说说当被选择元素和数据数量不一致时该如何处理. 这一节将涉及到三个函数. 1. update()    当对应的元素正好满足时 ( 绑定数据数量 = 对应元素 ) 实际上并不存在这样一个函数,只是为了要与之后…
Surface Shader中的自定义光照模型 当你在编写 Surface Shaders 时,是在描述一个表面的属性(反射颜色.法线……),而且光的交互过程是由一个光照模型来计算的.内建的光照模型有Lambert(漫反射光照)和BlinnPhong(镜面光照). 有时候,你可能想要使用一个自定义的光照模型,这在Surface Shader中是可能的.光照模型其实就是一些满足某些约定的Cg/HLSL函数.Unity内建的光照模型Lambert和BlinnPhong定义在Lighting.cgin…
Seven Python Tools All Data Scientists Should Know How to Use If you’re an aspiring data scientist, you’re inquisitive – always exploring, learning, and asking questions. Online tutorials and videos can help you prepare you for your first role, but t…
Binding data(数据绑定) D3各种图表的作用体现在将数据(Data)转换成可视化的过程. 比如将一个月的气温数据,通过树形图来展现,能够直观的看到气温走势,下个月还需不需要穿秋裤 :) 我们通过D3的 selection.data() 方法来将 data 绑定到 DOM 元素.因此,一个绑定过程的必要条件既是:data 和 DOM目标元素(没有目标元素,你还bind个卵~). 从Data说起... D3还是很聪明的,可以处理多种data类型,像数组.字符串.对象类型.同样可以优雅的接…
Unity网页游戏是跑在浏览器的UnityWebPlayer插件中的,运行的模式是webplayer.unity3d+html 在嵌入UnityWebPlayer的网页中会调用UnityObject2的initPlugin函数,将webplayer.unity3d作为参数传入来初始化Unity网页游戏的运行环境 注:游戏dll及其他托管dll在构建Web版本时都会写入到webplayer.unity3d文件中 UnityObject2.js (其他链接1  其他链接2) 拥有检测 Unity W…