- Home /
CTRL+S > "you must exit play mode to save the scene" But I don't want to save it
How can I make CTRL+S NOT trigger that message in play mode?
I want to use it for a blocking movement in game, don't want to start any editor functions with it.
Thanks
https://issuetracker.unity3d.com/issues/disable-editor-keyboard-shortcuts-while-playing just found this issue on the bug tracker as post-poned. Well does anyone have a workaround?
Agh.. this is one of those things that show the Unity devs dont use their own engine for serious projects imo. Or they would have run into this at some point. Hope it gets fixed eventually.
Answer by hexagonius · Jul 06, 2017 at 01:59 PM
You could create an additional void OnGUI()
function. Within that, you can check what Event.current
is and if it's your key combination, use Use()
on it. It's supposed to comsume the command from the editor. I haven't tried it though, but it should work I guess.
I have to try that later, thanks! What's Use() though?
Event.current.Use();
By calling Use the current event will be replaced by EventType.Ignore so any other event processing method does not react to that event.
I don't think it works, it still shows that message.
Your answer
![](https://koobas.hobune.stream/wayback/20220612125645im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Help In Making a SphereCast for 3D Tire! Working RayCast Script included! 0 Answers
How to forbidden hotkeys in playmode? I want to use Ctrl+S in my game. 1 Answer
Unity3D mouse events not working on Amazon Web Services EC2 instance in Play mode 0 Answers
[Unity Editor] Emulate Touch Input - Still Asking 12/10 1 Answer