Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Mykhaylo on May 15, 2014, 10:18:55 AM

Title: Trying to take screenshots with different resolution
Post by: Mykhaylo on May 15, 2014, 10:18:55 AM
Hi,

I am trying to develop a unity plugin that is making screenshots for iOS, Android & WP8 Stores.
There are many different resolutions.

The problem is that NGUI is not updating when I am changing screen resolution.
  1. Screen.SetResolution(width, height, false);
After changing resolution, I am waiting for 5 frames.
This is the way I am taking screenshots:
  1. Texture2D screenShot = new Texture2D(width, height, TextureFormat.RGB24, false);
  2. screenShot.ReadPixels(new Rect(0, 0, width, height), 0, 0);
  3. screenShot.Apply();

How can I update NGUI to match my resolution?
Title: Re: Trying to take screenshots with different resolution
Post by: ArenMook on May 15, 2014, 11:29:31 AM
You need to send Update() to all widgets, then LateUpdate() to all panels.