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 - r.pedra

Pages: 1 [2] 3 4 ... 9
16
Working like a charm, thank you

17
Hi,
We have a problem in our project.
Some scrollbars are related to each other and does stuff when the others do stuff.
The problem is that when a Scrollbar have a value of 0, something is going wrong, and built in anchors are not refreshing correctly.

On the screenshot, the object container is the background of the UIScrollbar on Aff. You can see that the UISprite on Container have his anchors left property linked to an object named Sprite. This is the Sprite object below Eco.
But for some reason when the UIScrollbar start and that its value is setted to 0 in the code, even if we call ForceUpdate, UISprite is disabled(seems to be related to the 0 value) and the anchor doesn't refresh.
(I updated to the last version of NGUI but it didn't solved my problem).
So where does NGUI disable Widgets when Scrollbar value is 0 ?

18
NGUI 3 Support / Re: All sprites are shifted to the left slightly
« on: January 07, 2016, 12:38:57 PM »
He just explained that due to DirectX 9, he has to apply an half pixel offset to all sprites(so this is why it's not at the center of the rect), to render the sprite crisp and not blurry.

19
NGUI 3 Support / Re: NGUI Update Optimisation
« on: January 05, 2016, 09:13:29 AM »
The fact that having every script have its own Update() function vs having a single Update() in a manager that calls child updates has been like that since Unity's inception. It wasn't a secret, there just wasn't a blog post about it. It's the same about all functions. There is overhead every time C++ to C# boundary is crossed. Once you're in C#, it's faster to stay there if at all possible.

I tried it before but realistically there was little noticeable difference in performance and there were odd side-effects related to going from play mode to edit mode that were fixed by using Update() in widgets. Also note that if things are not visible you should keep their game objects disabled anyway, implying their Update() won't run.

If you want to go with the reduced Update() just to try it out, you can try it yourself easily enough in 2 simple steps:

1. Rename UIRect.Update() to UIRect.CustomUpdate().

2. Add this function to UIPanel:
  1.         void Update ()
  2.         {
  3.                 for (int i = 0, imax = widgets.Count; i < imax; ++i)
  4.                         if (widgets[i].panel == this) widgets[i].CustomUpdate();
  5.         }

P.S. As for ETC1 stuff... that will never happen. Android is just one platform. NGUI needs to work on all of them.

Great answer, thank you for your time. The fact is that we have very very very long lists and that we have to make optimizations by Disabling all the widgets that are not in the range of the clipping panel. Maybe that would have helped us, but we will continue this way.

For ETC1 you could have make it available only for Android, but I understand that you don't wan't to waste time just for it. We will stay with our custom solution.

20
NGUI 3 Support / NGUI Update Optimisation
« on: January 04, 2016, 10:06:32 AM »
Hi,
I saw an article on Unity Blog that could be useful to NGUI:
http://blogs.unity3d.com/2015/12/23/1k-update-calls/

Maybe you already did something more optimized that what he is explaining, I don't know. Are you planning to do something like that if it helps NGUI runs faster?

Moreover, did you ever thought about the ETC1 + alpha system with NGUI?
You know that on Android ETC1 is a great compression format but it does not use Alpha.
We did a little workaround in NGUI Shaders and UIDrawCall.cs to handle ETC1 atlas + Alpha8 mask. (For a 2K textures, we freed about 10Mb of memory on the disk for a similar render quality).

21
Misc Archive / Re: Building Material Design UI with NGUI
« on: October 13, 2015, 05:51:54 AM »
Would love to see this in Asset Store or whatever. This is so amazing

22
Nope

23
Seems to be related to the Power Of Two setting of the texture.

24
I had the same problem today. If I enter random things with my keyboard, it doesn't go to the next line but if I write words, sentences etc... then it goes to the next line.
Weird behaviour.

25
Not a bad idea. I'll work on it

27
Hey Michele & r.pedra,

Thanks for reading. I sorta felt the "use static" would be painfully obvious, but I mainly wanted to show the numbers associated to make it clearer just how much it helps.

I purposely didn't make a comparison with 2.7, because there have been so many underlying changes that it's not a fair comparison - performance in certain areas, like huge scroll lists, have been sacrificed in order to have explicit ordering the way it is now and other feature improvements.

There are ways to combat this, by not just putting all objects in but instead using containers which you fill with information when they're supposed to draw - then you're generally limited to <10 containers at any one time vastly increasing your performance (and making unlimited scroll lists possible).

NGUI does not do this internally at this point, and it's up to the individual developer to implement this. Without changing the scrollviews fundamentally, it's not something that's easily done on NGUI's end.

Hi don't think our use case is compatible with your solution.

Basically You have a map:

----------
|          |
|          |
|          |
----------

But the user only see a part of this map and can scroll on it.
On this map, planes are moving along path rendered with Vectrosity(that literally have no impact on the scrollview perf).
What you suggest is to move the planes into multiple Panel is that right? It will increase drawcall no? Is the drawcall increase going to make it worse?

PS: I link an image of what we're doing, this way, you will understand it better

28
Yes I saw that on Steam, front page , that's awesome ! You're like super rich now ahah :P

29
NGUI 3 Support / Re: ScrollView/Grid on PS4
« on: May 27, 2015, 11:26:55 AM »
Probably a shader not compatible with PS4 GPU. Maybe you can start dig here.

30
NGUI 3 Support / Re: Dont clear afterimage on the mobile.
« on: May 26, 2015, 04:38:34 AM »
Is your camera Clear Flags set to "Don't Clear" ?

Pages: 1 [2] 3 4 ... 9