Application.UpdateScene when modifying textures...

I am dynamically updating some texture maps in my game (FFT transform audio graphs in real time).

However whenever I do either SetPixels or GetRawTextureData and modify the texture and call Apply, a dialog box pops up in the editor saying “Hold on (busy for X:XX)… Application.UpdateScene”.

And of course since I am modifying the textures every frame, this dialog box never goes away. In fact, I cannot exit play mode. The entire editor is stuck and frozen and I cannot do anything else. I have to end task on Unity. What is going on? How do I stop Unity from doing this? I have another older game where I dynamically generate texture maps, and I don’t remember Unity doing this before. Is this something new?

The textures have been created using scripts (new Texture2D). They are not even in the scene (yet).

Help.

Is this in Unity 2020-something? I keep seeing threads pop up about this kind of thing. Makes me wary to make a project in 2020.

1 Like

Yes I am seeing this in 2020.1, but I am not sure if this is specific to 2020.1 or not.

Can you file a bug with code/project that reproduces the issue?

I already did yesterday. Case 1267999.

I’ve narrowed it down… it has nothing to do with specifically modifying the texture maps. It has everything to do with how long the Update() method takes. If it takes longer than a certain amount of time, the Hold on… box pops up. And having the Hold on… box pop up is baaaaad during play mode because if your Update() is slow, the pop up never goes away… and you can never exit play mode. Also, the pop up itself seems to have a severe impact on performance - the game mode view never updates while this pop up is visible. This pop up needs to die. At least during play mode forbid it from popping up.

You can set the time after which the popup shows up in the preferences (default 3 seconds)

A bunch of people asked for exact opposite, i.e. “I want to know when something was not-responsive for a while, including in play mode”. Some even want it to show up after half a second etc.

So yeah looks like a single behavior can’t please everyone, which is why there’s a preference.

It’s not about pleasing everyone - the problem isn’t with it popping up. The problem is that if, and when, it pops up, and if your Update() takes too long every frame, you have absolutely no way to exit play mode. The only option is to task kill Unity. That absolutely can’t be accepted as normal behavior / design on Unity’s part. Oops you accidentally made your Update() take a wee bit too long? MUAHAHAHAHA you are doomed! Task kill Unity and lose all your scene changes since the last save! HAHAHHA! That’s what it feels like. There needs to be an “exit play mode” button on the pop up itself if you are in play mode. This is because the pop up is modal and you cannot click on the normal “exit play mode” when the pop up is visible (you used to be able to, regardless of how long your Updates() took prior to the pop up feature).

Bottom line - prior to the new pop up, if your Updates() took took long you could just click on the exit play mode button and after the current Update() ends, the play mode would exit. With the new pop up - you are screwed.

3 Likes

Good point, will look into it.

How is all going? I have the same problem, what should i do? :frowning:

unity 2020.1.6f1
27 min… Hold on ((

6353898--706590--Снимок11.JPG

1 Like

Same here… Unity is busy for over 7mins (Application.Tick). I recognized that Unity is started hanging in Unity 2019.4.12 - without this note-window. Thought Unity 2020 maybe fixed it, but nope. No idea why this was no problem in 2019.4.11. Has it something to do with a package? It’s impossible to be productive with this “error”.

1 Like

2020.2.1 was getting pretty snappy and fast. Then updated to 2020.2.2 and lots of pop ups are kind of taking a long time.
Perhaps we could have an application ticker bar that doesn’t deny interaction and isn’t right in the middle of the screen?

yes, it’s major issue - now if u make, for example, infinite loop or some other superheavy stuff, you just can’t exit game mode - the only way is to kill unity.
You definitely should be able to exit game mode during the “updateScene” process. After that “force stop” you can view your logs and find what stuff makes this.

This has actually always been the case. If you doubt me, try it in Unity3, Unity4, Unity5, Unity 2017, 2018, 2019, doesn’t matter. Make an infinite loop in your code and Unity is doomed. SigTerm is ignored, SigKill is your only option.

I speculate that what they’re TRYING to do with the above warning window is to someday give you a way to regain control of the editor. Perhaps that way isn’t finished yet but the dialog is in place.

1 Like

This has been an issue for me for the last couple years. Project would be working fine, then out of nowhere constant Application.UpdateScene and Tic Hold messages. I deleted the Library folder and still after it came up, constant Hold messages while in Editor and Play Mode. I have over 30 projects on various versions. This started messing up on 2020.3 version, and at one point attempted 2022.1 and really hosed it up. I restored from a backup which worked for awhile and then today, it started the UpdateScene hold constant messages over and over again. I changed the default 3 seconds to 0.1 or 1 or 5, really made no difference, kept hosing up.

Finally, I just did a backup, upgraded to 2022.2.1f1, and no more hold messages after the update. Thank you Unity for fixing that issue. So far things are working, thou I am getting a lot of RenderTexture.Create failed: colorFormat & depthStencilFormat cannot both be none. So looking into this now. So if you are getting these Application.UnityScene and Tic Hold Messages over and over, either restore from backup, or upgrade to 2022.2 version. May have to suck it up and fix outdated issues, however well worth it to put a stop to those stupid hold messages.

Well, it seems to be less frequent, however still there. At first all appeared to be running much better, then it started the UpdateScene message again about an hour into making changes. I do find that if I hide the Terrain, the message tends to go away. May be trees causing the issue. Would be nice if Unity worked quicker and did away with this message. Seems like 2017 to 2019 worked better and quicker.

Visual studio is not interfering? What kind of activity is your coding software doing while unity runs. Are very large pages and many tabs open?
This can some times happen when switching focus from one window to the other.

Didn’t seem like it made a difference removing all trees. I am thinking the issue is lights. Even thou I had Auto Generate turned off, and other GI lights off, the Editor was still slow and the UpdateScene kept coming up. I turned off all point and spot lights, and I noticed in this version, the GI Processing was always running, every time I scrolled or moved around in Editor, and it says SkyManager reflection probes constantly anytime I shifted the screen, it would come back. I found this article Unity - Manual: SkyManager

Which I set the resolution of the sky to 128, and finally I disabled this Tenkoku DynamicSky I’ve been using for 8 years, and the SkyManager Processing has gone away, and the Editor is more responsive and no UpdateScene messages now. So if you are experiencing constant Popup Messages and editor seems slow, check lights, SkyManager processing all the time for reflection probs. Process of elimination till you find what is slowing things down.