Unity3d编辑器:如何防止退出播放模式时撤消更改? [英] Unity3d editor: how to prevent changes from being undone upon exiting play mode?

查看:232
本文介绍了Unity3d编辑器:如何防止退出播放模式时撤消更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

显然,这是一个初学者的问题(我也是),但这使我发疯,我找不到任何提起的东西:

Apparently this is some beginner's question (and that I am) but it's driving me crazy and I couldn't find any mention:

我有时会忘记退出播放模式并继续构建我的UI以进行对象和更改,只是意识到我仍然处于播放模式我认为 Unity Editor 具有其允许在 Play模式下编辑脚本/场景的原因 >(很高兴听到一些例子-也许是测试场景?),但我的主要问题是:

I Occasionally forget to exit Play mode and go on building my UI making objects and changes, only to realize that I'm still in Play Mode and as soon as I unpress the play button, these will be purged! I suppose the Unity Editor has its reasons for allowing editing of Scripts/Scenes while in Play Mode (would be happy to hear some examples-maybe testing scenes?) but my main question here is:

我有什么办法可以防止这种行为?还是至少有一些技巧可用来防止播放模式中进行更改? (除了对此变得偏执并不断检查...)

Is there some way for me to prevent this behavior? Or at least some trick that you use to prevent me from making changes while in play mode? (Other than becoming paranoid about it and checking constantly...)

谢谢

PS. 叹气是时候回到Unity并重建我丢失的UI了...

PS. sigh time to head back to Unity and rebuild that UI that I lost...

推荐答案

其他Unity编码人员在我面前遇到了这个问题,他们提出了一个简洁的解决方案. 在播放模式色调"播放模式下,将用户界面设置为其他颜色.

Other Unity coders have had this problem before me and they came up with a neat solution. Setting the UI to a different colour while in playmode "Playmode tint".

您可以在此处阅读详细信息(最初发布于2009年,但我已经检查过它在最新的Unity 5.3中仍然可以使用):

You can read the details here (originally posted 2009 but I have checked it still works in latest Unity 5.3):

http://answers. unity3d.com/questions/9159/best-strategies-for-not-accidently-editing-whilst.html

这篇关于Unity3d编辑器:如何防止退出播放模式时撤消更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆