Changing resolution opens new windows

Whenever I use Screen.SetResolution() to change the resolution of a mac standalone program it creates a new window with the new resolution. An empty window with the previous resolution can be seen behind the new window. The same thing happens when I use cmd+f to switch between fullscreen/windowed.

This only happens with mac standalone programs. Windows programs created from the same project run without any problems.

Any ideas on what’s causing this or how to fix it?

(I’m using the latest version of Unity)

I’m back at the office after my holiday, so I can post some extra info.

Here’s a screenshot showing the extra windows created each time the screen resolution changes:

Here’s the code:

function OnGUI()
{
	for(var i : int=0; i<Screen.resolutions.length; i++)
	{
		if( GUI.Button(Rect(10, 10+(i*25), 100, 20), Screen.resolutions[i].width + "x" + Screen.resolutions[i].height) )
			Screen.SetResolution(Screen.resolutions[i].width, Screen.resolutions[i].height, false);
	}
}

I installed Unity 2.6.1 on two other macs, recreated the project and got the same problem each time.

The project shown above is uploaded here. I’d appreciate it if anyone could try it and see if they get the same problem.

I ran into this last week and filed this as a bug. I recommend you do the same and include the project folder in your report.

Yep, I did that before I wrote the second post. Glad to know I’m not the only one with the problem.

Our problem appears a bit worse. The multiple windows stay on the screen and force the new resolution into the lower left corner. The screens then accumulate if you keep resizing.

We can fix this by manually pressing command-f, but can’t find a way to code around it.

We’re using Screen.SetResolution().

This is killing our new release so any help would be urgently appreciated.

Thanks!

So it starts out like this:

And then progresses to this:

And then this:

Yep, this bug is holding back our shipping date for the Mac too.

PLEASE Unity Tech, is there any way you guys could fix this and send out a patch?

If not, can you let us know when the fix will be ready?

This is hurting our bottom line as we really wanted to ship PC and Mac on the same CD but now we can’t.

Thanks,

-Rob.
Rocket Bunny Games

Guys,

We are aware of this problem, which was introduced with 2.6.1. A workaround for this could be to build using 2.6.

We will address this bug, and are discussing timeframes internally. It’s fair to say that no fix is currently planned for the next month or so.

Regards,
Graham

Thanks Graham for the news update.

I’ve rolled back to 2.6 and everything is ok.

Looking forward to the fix in the next update!

Thanks,

-Rob.
Rocket Bunny Games

Any movement on this? It’s now April, and we have just done a beta release of our game Tidalis for Windows and Mac. One of the first things some reported was this issue, which we had not discovered yet. Any ETA on a release of a fix for this, or workarounds beyond reverting to an older version of Unity (which I never had, given that we did not even come to Unity until March)?

I have to say, while overall I am super impressed with Unity, the fact that a bug like this could sit un-patched for four months is more than a little concerning to me. That doesn’t leave my company very many options if something is broken…

I don’t think we’ll see a fix for this until 3.0 is released, and that update will cost $ (unless you’re using the free version). So the only viable fix is to roll back to 2.6 (and deal with the bugs in that version). Yeah, I’m kinda disappointed in how UT has handled this also.

That seems… honestly inexplicable to me. This seems like a huge defect, something which affects a major platform for the product, and something which was a presumably simple fix. I am hugely impressed with Unity 3D as a product and a company overall, but this sort of thing is honestly very worrying to me. I don’t expect Unity or any other product to be defect-free, but I do expect for major defects such as this one to be fixed in a timely manner (within a few weeks, ideally) of being reported.

As a customer building products on top of this platform, my own customers don’t care if this is a problem with Unity – they look to me for a fix, and my hands are tied. I was a business software programmer creating SaaS products for nine years before becoming a fulltime game developer, and this sort of business to business licensing was typically covered by some sort of contractual assurances, code escrow, or otherwise. We had uptime guarantees that we had to meet, as well as clauses about timelines for fixing “material defects.” That was the only way that the clients could feel comfortable that if we screwed something up, they had some redress; their business could never be allowed to be ground to a halt for even a single day because of something on our end.

That said, I understand just how complex the job of Unity 3D is; there will be bugs, sometimes completely out of their control because of some other middleware or something about a platform that they rely on. And sometimes just because of all that complexity. The fact that there are not more bugs is seriously impressive, and something to be really proud of, I think. There’s an obvious commitment to quality here, and that’s why I feel comfortable building my own software on top of Unity’s. But things like this… this makes me nervous in the extreme. It’s been four and a half months, and no fix to something simple and important. It seems uncharacteristically unprofessional of the company, which is what I just don’t understand. I would guess it is due to a crunch to get Unity 3 out the door, but leaving existing customers in the lurch during that period is not a good thing to do.

I don’t mean to rant – I am still a huge fan of Unity overall, and think it’s the best possible platform for a variety of uses at the moment. A former colleague of mine has been advocating for me to switch to Unity since 2005, and I’m a recent convert but quite see what he was on about. It’s a great thing here. But that means I also want to see this platform be all that it can be, and leaving major bugs unpatched for months at a time is counterproductive at best, and self-destructive at worst.

Guys,

Just some info for you. This bug got fixed back in January. The fix has been waiting around for a release, and that is where things have got complicated.

We have had a number of scheduling issues which has meant a 2.6.2 was shelved in favour of a 2.7. The engineering for 2.7 has taken much longer than was expected and so consequently you guys are still waiting for this annoying problem to get fixed.

Can someone give an example of why building in 2.6 is not an option? I can appreciate it is not ideal, just wondering if there is anything that makes this not viable as a workaround.

Thanks,
Graham

Hi Graham,

Thanks for the info, and that is good to hear that this is more of a one-time thing rather than an ongoing pattern. Being relatively new, it is pretty hard to tell that sort of thing. And we all know how reliable it is to make assumptions based on a single data point.

At any rate, my problems with reverting to 2.6 are twofold:

  1. I don’t have 2.6, and there doesn’t seem to be any link for that on the Unity site. As a relatively new customer, the only thing I seem able to download is 2.61f

  2. Even if I did have 2.6, I would be really nervous about reverting, because assumedly you released 2.61f for a reason. Right now I have no idea what the full changelog is between 2.6 and 2.61f, and my searches have turned up no such info. With that info in hand, if I had a link to 2.6 I could then make an informed decision as which version makes more sense to use. As it stands, I am tempted to stay with the devil I know, so to speak.

Assuming that those two points were laid to rest, I could look at the 2.61 release notes and say if there was some reason I couldn’t revert. I don’t have any way of knowing at the moment, though.

Thanks for the reply,
Chris

Hi Graham,

I don’t recall what bug(s) kept us from reverting to 2.6 but the decision was made to just not release a Mac build until an “official” fix was posted. So we’ll just wait for 2.6.7 or 3.0 whichever comes first.

dendrophile - is there a link where we can download 2.6? Alternatively: is there a timeframe for 2.7?

2.6.0: