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

Pages: [1] 2 3 4
1
NGUI 3 Support / Re: Scroll View List-View effect
« on: October 28, 2016, 06:00:53 AM »
There is an option called "cancel drag if it fits"
I think that is what you need.

2
NGUI 3 Support / How to make scrollview update more smoothly?
« on: October 19, 2016, 08:56:25 AM »
We use NGUI 3.9.2 + Android/iOS
We've set Application.targetFrameRate to 30 while in fullscreen UI to prevent battery drain.
FPS meter shows us solid 30 fps but all scroll views seem to be laggy and micro-jumping (1px approx.)
There is no that real solid feeling when you drad scroll view - it feels wrong.
May it's because you round all positions while dragging? If so is there any way to turn it off or controll somehow?

3
panel.enabled = false
The thing is that we have around 500 sprites in a pool: 50 widgets with 10 sprites inside each
This widgets is map markers connected to 3d objects on a global world map.
When user drags/pinch-zoom the map we need to take and release different markers from\to pool.

So we can not just tun off the panel because it's selective operation.
We found that if we set alpha to 0 - NGUI stops to generate mesh. it's an options for us.. but all NGUI components on that widget are still updating (anchors, dimensions) and it eats CPU ms..

4
Hi there.
We need to show/hide 150-200 sprites on mobile at runtime with minimal hickup.
We tried:
- SetActive() for gameobject is slow.
- Move widgets to (20000,20000,0) not working because some widgets are anchored and removing/restoring anchors is slow.

What else can we try?

5
UILabels don't have an onChange event. What are you referring to?
UILabel inherits UIWidget.
UIWidget has OnChange.
When UILabel changes dimensions of its UIRect(because of resize freely) the event OnChange is not triggered.
But, when UILabel is set to shrink content and when i manually change the dimensions of UILabel - OnChange event is triggered properly.

This is inconsistent behaviour because in both cases UIRect dimensions are changed but only in one case the event is triggered.

6
When the dimensions of UILabel are changed by setting a text with new length (resize freely mode) - the onChange event is not called.

7
It doesn't matter. NGUI labels don't need bold and italic fonts to print something in bold or italic.
Lol  :) Any UI designer who is familiar with typography and importance of differences of regular/itallic/bold glyphs will shoot at you with a shotgun )))

But I understand that in most cases it's ok since most of games are not like Crusader Kings or EVE Online. This small differences are crucial when you have tons of text/tables etc and "readability" can really make this mess usable for player.

8
You can use bbcode in dynamic font labels for things like italics, bold,
Nope. We can not, because bold and itallic are different fonts.

9
If you want to support emoticons as well and those emoticons will only be to the left or right of your text, I suggest using 2 labels instead. One for text, and another for emoticons.
We decided to go with dynamic fonts. As for emoticons.. if there is a way to get a single char-quad(unicode of emoji) position we can create some component that will listen OnChange of a label and if changed the child smiles took from pool/instantiated into right positions.

10
NGUI 3 Support / 90 deg rotated widget/sprite/label + Anchors
« on: February 04, 2016, 01:47:14 PM »
Is there any method or workaroud to anchor +-90 degrees rotated sprite/widget/label?
Maybe there is some kind of checkbox to tell NGUI that this particular widget is left or right rotated so for ex. Top Anchor now should be treated as Left or Right Anchor accordingly?

11
Hi there!
What is the best approach for fonts management/preparation/ui-architecture(NGUI) if we need this to be done:
1) We need to be able to display nicknames like "--=次访谈中WithFist=--". Mobile multiplayer multilengual game including arab, chinese,cyrillic & latin.
2) Fonts rendering should avoid trilenear smoothing and appear crisp&sharp and on iPhone4s and on iPhone 6s+ and on Nexus 5.
 - If it will be a bitmap font i guess there should be kind of UILabel wrapper that will switch between x1 x2 sized bitmap fonts. For ex. UILabel size: 24 should use MyFont_24 on iPhone4s but MyFont_48(or MyFont_24x2) on iPhone6s+
 - If it will be a dynamic font than why there is a size property there? Or dynamic means "set of characters will be baked during runtime but in specified size"? Or what exactly means "dynamic" in NGUI UIFont and why there is a size property (there is one already in ttf font import settings inspector(unity native))
 - If it will be a Unity font than we have a size property in the import setting of the TTF as well and we have no ability to use [bb] codes, which is bad

For now we see a problem with "per-glyph" font fallback.
For example we have nickname --=次访谈中WithFist=--. We can do something like break this into 3 UILabels and anchor them in chain. 1)--= 2)次访谈中 3)WithFist=-- But it becomes very complicated when you have this nickname inside a long text...

12
NGUI 3 Support / Particle & FX ligrary for NGUI
« on: December 21, 2015, 05:30:58 AM »
Hi there!
Drop here some links to Particle FX / UI fx compatible with NGUI.
Articles, Assets, all are welcome.

13
NGUI 3 Support / Re: Render single sprite or even widget to RenderTexture
« on: November 25, 2015, 07:51:00 PM »
By the way here is teaser of one of 50 ships  :P

14
NGUI 3 Support / Re: Render single sprite or even widget to RenderTexture
« on: November 25, 2015, 07:45:20 PM »
The prefab toolbar creates square preview textures, so I don't quite understand the first part of your post... The only trouble I see is positioning the camera so that it's in the center of the widget, and then adjusting its size so that it fits the widget within, but again the prefab toolbar does this for you so you can use its code as an example.
Here:

15
NGUI 3 Support / Re: Render single sprite or even widget to RenderTexture
« on: November 25, 2015, 06:26:24 PM »
NGUI's Prefab Toolbar does this, at edit time even. I recommend checking the code within -- but the idea is simple: create a temporary panel, camera set to use a render texture, instantiate whatever you want rendered into a texture, render it, then destroy the temporary panel, camera and objects.
Yep! Doing that right now. But faced a problem on Android/iOS. We are making a component for complex masks created using UISprite etc. wich are calculated once at start (so it's quite eficient) Think of 9slice masks from atlas  sprites etc.

Problem is that masked UITexture with custom shader supports only one UV set (you build a temporary mesh that way and we dont want to hack it).
Resulting rendertexture of mask equals screensize (not square & not power of 2)
Masked UITexture _MainTex & _AlphaTex(from shader) size has to be square and to be power of two on device
So if we dont want to do bilinear\trilinear interpolation on CPU (interpolate rendered mask-widget rect to square pow2 texture2d) we have to change shader and make _AlphaTex to use UV2 so we could manipulate _Alphatex offset&tiling separately from _MainTex.
But.. no UV2 on UITexture and we understand why: small business value + a lot of work.

Maybe you have any other idea? (without NGUI patching/hacking but still elegant?)

Pages: [1] 2 3 4