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 ...
随机推荐
- [SQL基础]入门
目录 什么是SQL? SQL能做什么? RDBMS SQL常见数据类型 SQL语法 什么是SQL? 结构化查询语言(Structured Query Language)简称SQL. 结构化查询语言是一 ...
- NHibernate 3 Beginner's Guide
前言 这一章是一个完整的NHibernate的Simple,原文中用Fluent NHibernate做映射,但我使用NHibernate3.2版本,所以3.2的Conformist代替Fluent ...
- 【资料】wod属性
各个属性的影响力量 st 影响近战远程伤害和体力体质 co 影响体力(比力量的影响大)智力 in 影响法力和魔法防御灵巧 dx 影响近战远程命中和近战躲闪魅力 ch 影响诅咒和治愈能力,诅咒攻击命中和 ...
- TortoiseSVN 冲突解决详细步骤 (图)
冲突还是很好解决的,但我没有试过在IDE里边集成怎样.记得VSS在Visual Studio里边解决冲突就非常完美,冲突自动报告,自动弹出冲突解决窗口,让你处理该怎么合并两份版本.合并后自动签入com ...
- 搭建简单Ext
一.EXT是什么? 1. Ext是一个Ajax框架,可以用来开发带有华丽外观的富客户端应用,使得我们的b/s应用更加具有活力及生命力,提高用户体验: 2. Ext是一个用javascript编写,与后 ...
- Java设计模式菜鸟系列(十七)桥接模式建模与实现
转载请注明出处:http://blog.csdn.net/lhy_ycu/article/details/40008711 桥接模式(Bridge): 把事物和其详细实现分开(抽象化与实现化解耦),使 ...
- [翻译] DFCircleActivityIndicator DF圆形活动状态指示器
DFCircleActivityIndicator Native, customizable and animated circular view to show when long activity ...
- sharememory.c
//进程通信,共享存储区 #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #i ...
- 如何更改postgresql的最大连接数
改文件 postgresql.conf 里的 #max_connections=32 为 max_connections=1024 以及另外相应修改 share_buffer 参数.
- STM32F103 GU906B模块GPRS、短信收发、拨号等功能的实现
这个程序搞了我很久,尤其是对如何提高响应速度上,程序流程很简单,大概就是: 发送AT指令->等待模块响应->一旦响应了,立即返回,并处理掉. 这个程序不一定只能用在GU906上,程序框架在 ...