Author Topic: Trying to take screenshots with different resolution  (Read 1201 times)

Mykhaylo

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Trying to take screenshots with different resolution
« 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?
« Last Edit: May 15, 2014, 10:32:09 AM by Mykhaylo »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Trying to take screenshots with different resolution
« Reply #1 on: May 15, 2014, 11:29:31 AM »
You need to send Update() to all widgets, then LateUpdate() to all panels.