Author Topic: nGUI scale problem  (Read 5781 times)

sleglik

  • Guest
nGUI scale problem
« on: October 05, 2013, 05:14:21 PM »
Hi,

I have problem with nGUI and scale. My game will be for all resolutions (Android, iOS, PC). So any possible resolution all these platforms provides. I am designing that UI in 1024 x 768. In this resolution it looks good.

I tryed on UI Root (2D) change settings to all three options and nothing helped.

How to setup that some texture has width or height in %? For example I want to have that button has always 10% of width and 5% of height and doesn´t matter what resolution it is. Instead pixel I need percent. I found video how to solve scale but "Automatic" is in the older version.

I am really sorry if this topic already exists but this forum has 176 pages and search for scale offer no good answer.

OnlineCop

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 51
    • View Profile
Re: nGUI scale problem
« Reply #1 on: October 05, 2013, 07:30:51 PM »
If you want absolute scaling, use UIStretch. Set its Relative Size to 0.1 (10%) and 0.05 (5%).
Otherwise, select the UI Root and change the ScalingStyle and see if PixelPerfect/FixedSize/FixedSizeOnMobile works best for you.

sleglik

  • Guest
Re: nGUI scale problem
« Reply #2 on: October 06, 2013, 10:19:22 AM »
No it doesn´t help.

Can you show me how to do to have 1 UI for all resolutions? That scales jumps from one location to another.


sleglik

  • Guest
Re: nGUI scale problem
« Reply #3 on: October 06, 2013, 04:42:33 PM »
I tryed every possible combinations.

UIStrech has 7 options, UIRoot has 3 options in total it is 21 combinations = nothing works :)

Honestly very bad plugin. I don´t understand that happiness with this. I have to use regular GUI system.

ivomarel

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 53
    • View Profile
Re: nGUI scale problem
« Reply #4 on: October 06, 2013, 09:53:47 PM »
Hey Sleglik,

Perhaps you could share what exactly is not working? Are you using NGUI 3 or 2? Are UIAnchors what you are looking for? Screenshots always help.

Cheers,

Ivo

sleglik

  • Guest
Re: nGUI scale problem
« Reply #5 on: October 07, 2013, 03:50:21 AM »
http://www.portalprolidi.cz/n/BackgroundTexture.png

Okay, look at this picture. I have texture that is part of the GamePanel. This panel is only during the player´s turn. This texture must have 100% width, 100% height of the screen. It will make effect of border of the screen.

My problem is when I attach UIStretch that blue points for resize does not work. So I cannot move with that.  I am unable to fit to that camera border :).

This is only one example my problems with scale. I need to set that I design my UI for 1024x768 and scale will be calculated according current resolution.

I will give you example why UIStretch is not good.

I will create some button. I will manually change use that blue points size, position (everything). Now I have to find out size of that button. After that I have to manually recalculate how many percent is that button and than I can put correct value into UIStretch :).

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: nGUI scale problem
« Reply #6 on: October 08, 2013, 02:57:39 AM »
You still haven't mentioned what version of NGUI you are using.

Are you trying to create a fully modular user interface where the dimensions of everything scale as you change the size of the screen?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: nGUI scale problem
« Reply #7 on: October 08, 2013, 03:11:25 AM »
This video should help you: http://www.youtube.com/watch?v=q1C5NwZasGs