unity, editorWindow lose data when enter play mode
我写了个editorWindow,其中有个成员变量m_x,在创建editorWindow的时候为m_x赋的值,而在editorWindow的OnGUI里把m_x显示出来。
当我开着这个editorWindow并点击unity的play按钮后,editorWindow中的数据丢失,即m_x变成null。
后来发现,原来是因为我把m_x定义成了static变量,如果改成非static变量,就好了。
unity, editorWindow lose data when enter play mode的更多相关文章
- unity, editorWindow update计时
对于editorWindow,Time.deltaTime不起作用,所以需用下面方法对update进行计时: public class myEditorWindow : EditorWindow{ p ...
- Unity EditorWindow知识记录
1.创建EditorWindow using UnityEditor; using UnityEngine; public class ZZEditorWindow : EditorWindow { ...
- Unity EditorWindow 笔记
一:功能 1.实例化 //设置插件在菜单栏的位置 和快捷键 [MenuItem("YCC's Tools/模型更改/更改父物体和测量长度 %W")] //实例化窗体 static ...
- Generate Time Data(普通日期主数据)
Note: While using this option you need to replicate the standard table into SAP HANA that is T005T, ...
- 【 D3.js 入门系列 --- 7 】 理解 update, enter, exit 的使用
在前面几节中反复出现了如下代码: svg.selectAll("rect") .data(dataset) .enter() .append("rect") 当 ...
- Unity Shader——Writing Surface Shaders(2)——Custom Lighting models in Surface Shaders
Surface Shader中的自定义光照模型 当你在编写 Surface Shaders 时,是在描述一个表面的属性(反射颜色.法线……),而且光的交互过程是由一个光照模型来计算的.内建的光照模型有 ...
- Seven Python Tools All Data Scientists Should Know How to Use
Seven Python Tools All Data Scientists Should Know How to Use If you’re an aspiring data scientist, ...
- D3.js data() 方法详解
Binding data(数据绑定) D3各种图表的作用体现在将数据(Data)转换成可视化的过程. 比如将一个月的气温数据,通过树形图来展现,能够直观的看到气温走势,下个月还需不需要穿秋裤 :) 我 ...
- Unity网页游戏
Unity网页游戏是跑在浏览器的UnityWebPlayer插件中的,运行的模式是webplayer.unity3d+html 在嵌入UnityWebPlayer的网页中会调用UnityObject2 ...
随机推荐
- MySQL MERGE存储引擎 简介
MERGE存储引擎把一组MyISAM数据表当做一个逻辑单元来对待,让我们可以同时对他们进行查询.构成一个MERGE数据表结构的各成员MyISAM数据表必须具有完全一样的结构.每一个成员数据表的数据列必 ...
- 【jQuery】remove()和empty()的使用
在项目需求中 ,会涉及,为select下拉框中重新填充或追加新的下拉项. 这样的话 之前的下拉项就需要清除掉. 有了这个需求,就需要我们注意到remove()和empty()的区别在哪里: empty ...
- ExtJs4.0日期控件只显示年月按年月格式会跳月的解决办法
如果是Ext.form.panel的话,只要设置一下属性就可以.如下代码: { text : '期间', width : 80, sortable : true, dataIndex : 'accou ...
- [Gradle] Gradle 构建工具的未来
转载地址:http://www.infoq.com/cn/news/2011/04/xxb-maven-6-gradle Maven面临的挑战 软件行业新旧交替的速度之快往往令人咂舌,不用多少时间,你 ...
- iOS开源项目:FlatUIKit
FlatUIKit是iOS中具有扁平化风格的UI(Flat UI)组件.FlatUIKit的设计灵感来源于Flat UI和Kyle Miller.FlatUIKit中的组件是通过扩展(category ...
- 双sonar的cache问题
- android:Layout_weight的深刻理解
最近写Demo,突然发现了Layout_weight这个属性,发现网上有很多关于这个属性的有意思的讨论,可是找了好多资料都没有找到一个能够说的清楚的,于是自己结合网上资料研究了一下,终于迎刃而解,写出 ...
- hadoop实战--搭建开发环境及编写Hello World
本文地址:http://www.cnblogs.com/archimedes/p/hadoop-helloworld.html,转载请注明源地址. 欢迎关注我的个人博客:www.wuyudong.co ...
- windows删除或修改本地Git保存的账号密码
windows删除或修改本地Git保存的账号密码 学习了:https://blog.csdn.net/xudailong_blog/article/details/78798118 (一)进入控制面板 ...
- [AngularJS] Angular 1.3 $submitted for Form in Angular
AngularJS 1.3 add $submitted for form, so you can use $submitted to track whether the submit event ...