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 - blitzer

Pages: 1 [2] 3 4
16
NGUI 3 Support / Re: Question on "Flexible" vs "Constrained" UI Root Types
« on: December 27, 2014, 01:38:44 AM »
Right on the money, thank you!

17
NGUI 3 Support / Re: Question on "Flexible" vs "Constrained" UI Root Types
« on: December 23, 2014, 11:13:50 PM »
@r.pedra: (thanks for responding)

What did you specify for Constrained parameters?
->I don't quite understand the question (sorry), the Constrained UI Root type works exactly as I expected, its the Flexible option I'm not understanding. For Flexible (to test in the most simply way possible), I just put a 100x100 widget with a sprite in it and tried different resolutions and noticed that the widget seems to scale with the resolution (which I thought was not supposed to happen under Flexible). I attached  new example picture showing the UI Widget (which has no anchors) with 2 different resolutions and editor window sizes, and the UI Widget still seems to occupy the same amount of screen space even under Flexible.

18
NGUI 3 Support / Question on "Flexible" vs "Constrained" UI Root Types
« on: December 23, 2014, 07:29:19 AM »
Hello everyone, I'm sorry I even need to ask this, but I'm just not getting it:

I've always thought that I understood "Flexible" vs "Constrained" UI Root Types. Flexible makes Widgets stay the same size in pixels regardless of resolution (so a 100x100 widget would be relatively large on a screen of say 480x320 and quite small on say 2048 x 1536, while Constrained makes the Widget into a % of the screen based on parameters, so the Widget will occupy the same screen space at both example resolutions.

However, I was trying out Flexible today and noticed that no matter what I did, a 100x100 Widget seemed identical on low resolution screens as high resolution screens inside the editor. I thought that perhaps my physical monitor resolution was perhaps obscuring my results, so I tried the lowest resolution I had and the widget actually got smaller....what? I also tried changing the window size in the Editor, same results.  So I guess I don't understand Flexible at all, seeing as the widget remained the same size regardless of screen resolution differential.

Any clarification is appreciated.

19
Hello everyone, I've got a "General Process Question" (which I don't expect a "complete answer" for) but perhaps just some guidance on my approach:

In the past, when dealing with mobile devices of different physical size (like a iPhone vs an iPad), I've made different UI setups that each had different sizes of UI elements to account for the physical size of the devices (so for example you wouldn't want a button size for an iPhone to maintain its scale on an iPad since the button would be huge since the iPad is just physically much larger).

This setup will work in the end, but when you need to make a change, you then get stuck making it over and over again for each UI setup. So I have been trying out a programmatic approach where I adjust the anchor size and widget size of the elements based on the device being used to adjust the size of each button (so when it ends up on the device, it is appropriately sized).

It also seems to work, but I'm worried about making a script / scripts that cover all my UI elements (some elements may need scaling, or not, or elements may need different scaling, etc...). So I'm wondering if anyone has either tried this type of approach before, or has something better.

Any thoughts are appreciated, thank you for reading.

20
Hello everyone, I was wondering if anyone has done or has heard of a way to "scale" / account for UI element size on devices of different physical sizes (not resolutions).

Example: Imagine that an iPhone and iPad had the same screen resolution, even though the amount of screen space the UI elements take up is identical, the buttons on the iPad are much larger in the real world, to the point of being difficult to use (this also goes for the space between elements).

What I've done in the past:
- I just went back and re-did all the UI setups making the elements "X" percentage smaller, so that when they got on the larger physical devices (iPads), the buttons weren't too big.

So, is there a faster / smarter way of doing this re-sizing without re-building all the UI elements over again? Any ideas are appreciated.

21
I see your point, and I guess what I'm trying to understand is how to keep that UI element in the same place / rotation, since I'm not actually looking to make that element "track" anything. Perhaps I could create  a empty Game Object that is a child of the ship, and have the UI element look at / track that Game Object.

As always, thank you for your responses.

22
I put up another diagram of what my setup is looking like in case it helps clarify things. I suppose what I'm looking for is not so much a "tacking" behavior, as much as the ability to just keep the UI element "in the same spot".

You can either use UIFollowTarget to make a 2D widget follow a 3D object, or just anchor it to the 3D object.
-> I'm not understanding in either case how the UI element would remain at the correct angle / distance to the camera if it is tracking or anchored to moving 3d objects (really, how "3d tracking" is converted to 2d space), any clarification is appreciated.

23
Hello everyone, I'm looking for some general guidance on creating a specific sort of UI element behavior with NGUI:

In Detail:
Essentially, I've got a target reticle that normally stays in a set position on the player's screen. When the camera moves, the reticle moves along with it (well really, it stays in place because its using NGUI and its being overlayed). But, I'm trying to make a system where the player can "unlock" the target reticle from the camera view, essentially allowing the player to rotate the camera freely and have the target reticle "remain where it was" until the player "locks" the camera back to the reticle.

I was wondering if anyone has done something like this before, or what approach you would take (2d ui? 3d ui? heirarchy setups, etc). I'm not looking for full code, just a good way to approach the issue. I've though about ways of just "moving it offscreen" but those seem clunky, I've also though about making the reticle invisible when the player wants to free-move the camera which is simple, but not quite what I'm going for.

Any ideas are appreciated. Thank you for reading.

24
NGUI 3 Support / Re: Question on Scrambled Text
« on: May 23, 2014, 11:11:48 PM »
I tried your suggestion and it worked - thank you. One follow up if you don't mind:

In trying to stay away from dynamic fonts, I understand that bitmap fonts are a type of "non dynamic font" that seem to be quite common around Unity. Are there any other common types? I've tried searching for "non dynamic fonts" / font types and for things like "what is a non dynamic font", but all I get in results is more dynamic font types and dynamic font info. So I'm a little confused on how to get away from dynamic fonts.

25
NGUI 3 Support / Question on Scrambled Text
« on: May 23, 2014, 03:52:33 AM »
Hello everyone, I'm having a strange problem with some label text seemingly being randomly scrambled (see pic). I would like to note that I have seen a few threads that deal with this type of issue, though the tend to be fairly old and usually end with either NGUI having fixed it with a new version, or Unity fixing it in a new version.

The problem:
For some reason, text may not appear at all, may appear scrambled, or may flash on and off (and be scrambled). I have never seen it happen in editor or on a iOS device (though I haven't done THAT much testing on actual devices). The problem does however seem to happen every time on PC and MAC builds.

In the picture, all 4 labels use the same font, share the same settings, and the font is a .ttf, and I am using version 3.5.7. If anyone knows how to fix it or a workaround I would be grateful to know about it.

26
NGUI 3 Support / Re: Question on IOS Draggable Panel Optimization
« on: May 19, 2014, 01:52:33 PM »
Ok, that was the conclusion that I had come to, thank you for the clarification.

27
NGUI 3 Support / Re: Question on IOS Draggable Panel Optimization
« on: May 19, 2014, 03:00:47 AM »
Adjust the depth. All widgets have it, and it's what controls what's in front of what.
--That's what I'm getting at, the wood frame has a higher depth than any of the level box components, but the boxes are still being drawn on top of the frame - that was what was confusing me since both panels have the same depth.

28
NGUI 3 Support / Re: Question on IOS Draggable Panel Optimization
« on: May 18, 2014, 07:35:30 PM »
As per your suggestion, I re-did the ui setup with 2 panels instead of 4, which more/less doubled the FPS and cut the cpu time in half when the panel is moving. Two follow ups though:

1) Because I'm now only using 2 panels, the level boxes now render on top of the "frame" (the wood texture defining the box area). Since I can't use another panel to move the frame into a higher layer and because putting the frame on the panel that moves causes it to jitter when the panel moves, how can I make sure that the Frame renders on top of the level boxes?

- I've tried putting both panels onto the same layer and changing the layer order, but that didn't seem to work.

-And I've considered changing the parenting offset on the 2nd panel, but it still leaves room for error.

2) I'm still seeing the strange issue where when the screen is switched, I can see levels 1 and 3 load their images in order (and I'm even seeing this occur in the regular menu buttons as well), level 2 (and all other levels) don't seem to have this issue.

Any ideas are appreciated.

29
NGUI 3 Support / Question on IOS Draggable Panel Optimization
« on: May 18, 2014, 05:30:18 AM »
Hello everyone, I tested out my ngui setup for a draggable panel today, and got some some pretty sub-par results. I'm sure the problem is me (not knowing what to look for), and was wondering if I could get some feedback on what is causing the performance problems. Below, is a readout of stats from the game (while it was in Unity and XCode) as well as a screenshot so you can get an idea of what I'm going for:

Notes:
- This is on a iPhone 4
- all atlases and atlas materials are unlit/transparent colored and no larger than 2048x2048
- when switching to this screen on the iPhone, I can actually see these images being loaded in according to their depth (so background, then image, then image frames, etc).

Stats:
Xcode general stats:   cpu   memory   fps         
                          23%   28.4mb   22         
                  
xcode opengl es stats:   utilization (tiler)   utilization (renderer)      frametime (cpu)   frame time (GPU)   
                               3%                100%                        7.5ms                45ms   
                  
unity internal profiler stats:   cpu player   cpu ogles-drv   cpu-present   cpu-waits-gpu   frametime   update
                                      6.31              0.9                  37.6                  37.6                 45       3.2
                  
unity editor stats:   draw calls   used textures   Vram                   VBO total      
                               10              4-46mb              1.9 to 46.6mb   23-106KB      

Any ideas are appreciated.

30
I see, thank you.

Pages: 1 [2] 3 4