- Home /
Disable Update function in Scripts
Hello Everyone,
I would like to disable the Unity engine in my script to stop rendering and computing (use too much CPU). Disabling all the script components and stopping the camera rendering are not sufficient.
The solution I found is to create a new thread which waits (WaitHandle.WaitOne() function) a particular event in my Update().
It works if the freeze does not last a long time (for example 30s). However after a given time, when I want to release this thread, my Unity application is still frozen during a very long time (at least 2 min of waiting). Do you know why I get this behaviour? Does it come from Windows (which blocks my application) or Unity? Do you have another solution to propose me?
If you want more details, feel free to contact me.
Thanks!
Hugo
PS : it seems to only appear with a standalone application (not in Unity Editor).
Thanks, but I have already try that, but I want to stop the Unity engine so that it won't use any CPU. (I have 2 Unity applications, and I want one to be stopped while the other is running.)
Your answer
Follow this Question
Related Questions
Pausing/Stopping the Update Function 1 Answer
disable the update to a script in c#? 2 Answers
How Stop Update function of other scene 1 Answer
How to disable API updater 1 Answer
Just updated to 4.2.1f4... 0 Answers