Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Erbacher

Pages: 1 [2]
16
NGUI 3 Support / Re: Controlling UIPanels sizes
« on: December 13, 2013, 01:20:54 PM »
Thanks for replying ArenMook.

However I am still seeing my Menus being scaled after I have created them;

1) What I am seeing is when the prefab is instantiated, via NGUI.AddChild and attached to a anchor, it is as big as when I created it in my scene.
2) Then I run it through a class which scales it to a portion of the screen that I want it at.
3) Finally it seems that something is then scaling it again to be extremely small. The inspector states the scale of the prefab is 0.0133 when the code and maths should be re-sizing the prefab to the screen height.

I have tested the maths from our class which scales the prefab, and all of the maths seem to be correct. So I am not sure what is going wrong.

Also you mentioned that modifying the scale will make my prefab not have pixel-perfect coordinates, however the class lets me do this. So I was wondering if you could clarify exactly what you meant?

Thanks for your time.

17
NGUI 3 Support / Controlling UIPanels sizes
« on: December 06, 2013, 01:35:27 PM »
Hello all,

The project I am currently working on requires a lot of menus to be created via code and I would like to see if I am able to re-size my menus when I create them.

Currently I have a UI hierarchy that looks like this:


I am able to now parent any menu I create to a anchor, so I pick where it spawns.

However currently when the menus are being created they all seem to be being re-sized to the same size, not matter how big the original prefab is.
I am wondering if I have missed something or if I can control the size of a menu when it is created.
I would prefer if I can control the size via code and not have to do it manually, however any answer is appreciated.

Thanks a bunch,
Erbacher :)

Pages: 1 [2]