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.


Topics - Ugur

Pages: [1]
1
NGUI 3 Support / Making menus appear not jerky
« on: November 19, 2014, 02:10:15 PM »
So here's the issue:
When i have ngui ui elements enabled and on the screen on app start, all looks fine.
But i have some items which are not enabled by default or added at runtime or resize in between etc.
Menus with scrollviews and header bars and panels which resize fitting to the screen dimensions, list items which reflow based on dimensions of previous elements etc.
And those all come in in jerky way the first time enabled/shown.
Its like it takes a frame or two for all the things to adjust to  dimension changes or content changes, changed anchors etc.
Is there some method(s) one can call to force it making all aligned and adjusted well right away when enabling it and showing it right in that frame the way it would usually display a few frames later?

2
So yeah, when having complex menus with scrollviews, lots of list items, anchored items around the screen etc, this has a way higher performance impact and battery using (on mobile devices) impact than it should.
I think this is due to good part due to the many UIRect/Anchor Update calls and UIPanel LateUpdate calls.
When i check the profiler, those NGUI things run constantly on all the items and have a considerably performance impact in total.
Ideally there should be a way where one can tell it to only Update when needed, which should be:
-when own or nested content (dimensions, color, pos, rotation, scale) changed
-when camera changed (position/rotation (,size for ortho cams))
-when screen changed (resolution/ screen orientation)
right now it is just calling all this stuff way too often (constantly).
And for anchors the option to do it only in start is no good either, let's say for cases like the device orientation changes and thinks should of course re layout, but then not re layout constantly anymore in update when nothing changed.

So yeah, would be great if there could be an option to do all those updates only when one of these 3 items is dirty/changed.

3
NGUI 3 Support / scrollview does not snap to top
« on: November 02, 2014, 11:03:11 AM »
So when using a UIScrollView and having toggled on "Cancel Drag if it fits" for it or if the content inside the scrollview is as tall or taller than the scrollview area (so it would perfectly fit without need for scrollbar or have to scroll anyway) and one drags the scrollview's content up or down, it tweens nicely to snap back to the top of the scrollview area when one releases it.

But when one has "Cancel Drag if it fits" disabled for the scrollview and the content in the scrollview is not as tall as the scrollview's area and then one drags the content and releases it, then snap easing back to the top does not work well for the content.
It works when dragging the content up and releases it, but when dragging it downwards and then releasing it, it only eases to scrollview top position+(difference between scroll view area height and  scrollview content height).
So the scroll content is then floating lower down instead of being moved back up fully to the y offset position of the scrollview.

Is this a known issue? Any thoughts on addressing this/working around it?

4
NGUI 3 Support / gradient sprites
« on: April 03, 2014, 07:28:43 AM »
Hello there,
before i hack my own, i wondered, will you add gradient sprites support anytime soon?
I saw this package on the asset store: https://www.assetstore.unity3d.com/#/content/10397
but it doesn't work with a recent ngui version.
That's also why i'm asking really, i prefer such things to come with ngui where possible rather than me adding them and that then breaking with the next ngui update =)

5
NGUI 3 Support / nested clipping
« on: March 15, 2014, 01:40:48 PM »
Will you ever add support for nested clipping?
Like a clipped panel area which in it contains a clipped scroll area (next to a header which should be clipped by the parent panel clip area but not the child scroll area) A pretty common use case for UI.
If not, could you at least change it so that one can have child panels inside a clipped panel and the clipping of the parent panel still works on the child panels if one has clipping turned off for the child panel? Not as nice at all as supporting nested clipping but at least it would give one some more flexibility in how one can nest panels.

6
NGUI 3 Support / pixelsnap on uibutton is total nonsense
« on: March 02, 2014, 05:25:12 PM »
I upgraded a project from ngui 3.5. to 3.5.2
The downside is that all fonts look sucky again now, the upside is that text uses a lot less memory, so i guess that was the reason you had to change that..

Anyway, the actual reason of this post is: why is there the property pixelSnap in UIButton.cs now, why is it turned on by default and then making that even worse its not even exposed in the editor script, so one can then only change the value via code.

To me that setting is complete nonsense. What it does is it changes the sprite to the default dimensions. Meaning any dimension change i apply to the sprite gets reset as soon as i add a UIButton script to the sprite containing gameobject. If there is already a UIButton script on the gameobject and i scale the sprite used by the button, it resets the sprites dimensions when hitting play. Who would want that?
Please remove that property again or if you totally want to keep it added, set its default value to false and expose it in the editor script, as it is it completely destroys scaling sprite button options, no use at all.

After looking through it i see why that was added, cause you combined the UIButton code with the UIImageButton code, that's ok, but yeah, then please make that property's default value false and expose it in the editor script, too.
Its just super annoying when one upgrades ngui in a project and each time many things break, like for this upgrade now the look of all my buttons and all text..

7
NGUI 3 Support / higher memory usage with newer version->more crash prone
« on: February 07, 2014, 01:20:31 PM »
So something seems to have changed in NGUI in one of the last 3-5 dot upgrades which leads to way higher memory consumption especially during enabling/starting up controls.
I noticed this because i'm working on an intense mobile app right now which was already floating close to the memory usage limits of an iPhone 4s and before updating to one of the last few ngui dot upgrades one of the scenes (i'm having issues with now) ran perfectly fine also with the ngui menu on but now since i've upgraded the ngui version that exact same scene with exakt same menu panel is crashing on the same device (even if the device is freshly booted before).
It very clearly crashes on mobile due to too high memory usage in the moment i enable an ngui panel with a scrollview and many toggle controls in it (it also outputs in the xcode console that the app was closed due to too much memory usage in that moment), if i don't enable the ngui panel it does not crash.
It runs ok on devices with more memory, but even on my highend macbook pro i can see that in the moment i enable the panel with the many toggles and several buttons, there's a big spike in resource usage and fps drop for a few seconds, too, so it makes sense that that is too much then on way more limited devices.
Again, this scene aswell as that ngui panel worked perfectly fine on that mobile device before i upgraded ngui from around 2-5 dot versions ago to the most recent.

I only have two possible guesses right now what could lead to too much memory usage there:
-NGUI has that sorta nice looking but resources wise wasteful and also lookwise not always wanted side that for controls like toggles etc it basically animates to the first state and also always when changing the state, no matter if that was set editor or codeside.
This means that when i have many toggles which have some animation/color fade on them then that by itself is already quite resource intensive to just show a bunch of items the first time since they all show their blinky setting first state anim.
Not sure if that happened, but if on top that part somehow now got even more resource intensive, i could see why it crashes due to that on mobile/devices with few memory.
[Edit:] Now i set transition to "Instant" instead of "Smooth" for the toggles, it still crashes on mobile device then when i turn on the panel, so that kinda reduces the likeliness of this starting animation being the culprit, that said, the "Instant" setting is actually buggy by itself cause when i turn on the panel, even in the editor, some toggles start with showing the to be toggled off bg with alpha 1 despite the toggle is toggled off at the beginning.

ok, back on other possible causes for the crashing when turning on the panel with many controls in it: [/Edit]
-Text: Something changed regarding text handling in NGUI for sure, the good side is that it makes my dynamic fonts text look much better than before, at least on the mobile devices its nicely very sharp now.
The downside is that somehow the changes made to that also seem to have some performance/cpu/memory consumption impact.
When i deploy my ios app, during deploy while showing the progress bar it even shows a message stating something in the vein that some text handling is taking longer than expected.

So yeah, these two are just my best two bets for right now, not sure if those are the cause or something else, but yeah, a bit of a bummer, this ui should really not make my app crash.

[Edit 2]Just upgraded to 3.4.9, still the same :I

8
NGUI 3 Support / Blurry dynamic labels
« on: January 20, 2014, 09:06:45 AM »
So yeah, when i show small (font size) text it is all blurry on both desktop (mac) and also on mobile devices.
Weirdly on mobile devices (iPhone etc) when i click around between different panels (all showing text) then somehow some of the blurry text becomes sharp. Doing the exact same toggling between the panels on desktop(web player does not lead to that though (it always stays blurry there).
I read in the release notes for the latest update that it is supposed to bring some improvements regarding enforcing using the correct text shader or similar, sadly i don't see any improvement on my small blurry dynamic font labels.

Not sure if the correct shader is not used or what's the problem.

Can you tell me which import settings i should choose for the font and which settings in the label to ensure it being sharp for a font size 12 or smaller (or ideally any font size setting) on all platforms (for dynamic font usage) ?

In case that is useful, i'm using the font Helvetica Neue, in some places in bold, in some cases in regular.

So far i can only get it to look sharp when instead of using the font in the size it should be shown at i instead set the font size way larger and scale down the label game object then. That brings its own share of issues then though like characters looking distorted at certain (i guess non int) position values.

I don't understand that at all really how that can happen, i'd expect it to look exactly the same when i use a small font and use the label at scale 1 as when using a large font and scaling the game object down to have the label text shown in same dimensions.

9
NGUI 3 Support / FixedDimensions
« on: January 16, 2014, 06:23:43 AM »
Is there any way to get NGUI to display the controls in fixed dimensions?
So that the buttons (all controls and ngui stuff really) have the same physical (not pixel) dimensions, no matter which screen size and screen dpi the device has?

By the name one could assume that the "FixedSize" value for scaling style in UIRoot would do that, but nay, it actually does not, the controls still get scaled based on the screen height.
This makes no sense at all to me, seriously, who wants his buttons to have different dimensions when one holds the device in portrait and again different ones when one holds it in landscape?

So yeah, is it possible in any way to get it to work in a way where the controls always have the same physical dimensions, no matter which screen res/screen height/screen dpi ?

10
NGUI 3 Support / Can't edit existing atlas
« on: November 14, 2013, 08:50:10 PM »
When using NGUI 3.0.5 and trying to edit an existing atlas where the base separate images are not in the project this doesn't work, while it worked fine in NGUI 2.7.

Example: Create a new project, import NGUI,import the NGUI v3.0.5 package, then open the atlas maker and open the refractive atlas from the examples/atlases/refractive folder.
Then try to delete one of the items in the atlas or adding another image from the project assets to the atlas.
It throws an IndexOutOfRangeException: Array index is out of range. error in UIAtlasMaker.cs in both cases.
When one tried the same (editing one of the bundled atlases) using the 2.7 package (or older) that worked fine.

That's a bummer :I

11
NGUI 3 Support / clipRange: from y offset to end of screen
« on: July 15, 2013, 08:37:15 AM »
Is there some way where one could have the clipRange (height) of an UIPanel to be set to from its offset y position to end of screen?
Basically so that one could have a scroll area which always fills the whole screen (starting from some x/ y offset), no matter how high the screen height is or if it changes.

12
NGUI 3 Support / UIDragObject one axis only
« on: March 06, 2013, 02:37:27 AM »
hey there,
just since it would be handy to have it be in the NGUI source, could you change UIDragObject like this so one can choose easily to drag only on one axis by toggling on/off the checkboxes? Like this for example =)

//just at the top add
   public bool dragOnXAxis= true;
   public bool dragOnYAxis= true;

//and in void OnDrag right below the line where you define offset add
            if(!dragOnXAxis){offset.x= 0;}
            if(!dragOnYAxis){offset.y= 0;}

Pages: [1]