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

Pages: [1]
1
NGUI 3 Documentation / Re: UITexture
« on: February 11, 2014, 11:36:55 PM »
Yea I've tried both ways. The first one seems new and yes it worked. Thanks a lot Aren!  ;D

2
NGUI 3 Documentation / Re: UITexture
« on: February 11, 2014, 09:23:26 PM »
Hi Aren,
I used to add UITexture without a texture, only material. But the material itself didn't have a texture either, I only used shader [Unlit/Transparent Colored]. This would draw a rectangle with plain color (and alpha channel, yes), but only in NGUI 2.x, not in 3.x as far as I see.
So can you please give me some guides on how to create a plain colored rectangle with UITexture. Or if it's not possible then, is there any other way to achieve the same? (it's best if I still can control it like a widget, I mean with the depth, width, height...) Thanks in advance :)

3
Ok I think I've solved the collision problem with buttons. I created a new project, use the same images, etc. and the problem's gone. I found out the thing caused that problem was another UI I put in the hierarchy besides my main UI, so I thought there should be only one UI in hierarchy before the game run, or anyone had any ideas why's that?
Anyway was super happy I got it working, tyvm for any suggestions guys  ;D

4
But, what I mean is, that scale (150,40) seems to apply to any button I create with Widget Tool > Template 'Button', even if I choose a background that is not 150x40, that's why I thought (150,40) was something on purpose or default or something like that.
It'd be ok if I then manually set the collider and sprite (background) scale to its actually size but this is happening everytime I create a widget button in any panel of any UI. Maybe there's something wrong being set in my project, anyway still hope someone already had and solved the similar issues. 

5
No my panel isn't marked "static" (as by default it isn't, I think).
I've tried to create a new UI, created 2 Button widgets and moved them to left and right corner like the first screenshot then still seen the same problem like I've described.
One thing I noticed about the Button widgets was when I created one, its background's scale would (always) be a fixed value (150,40) as well as its attached collider's size. Anyone got same thing happened? Or is that on purpose?

6
Hi there,
Thanks for the suggestions. The buttons are Simple Button widgets so they have box colliders added by default. I also set the position for their colliders to (0,0), and size to full sprite. I found one thing weird to notice was that the problem only occurred on mobile devices (I've also tested on 800x480px resolution and found same problem), there's no issues found on different resolutions of simulator.

7
Hello,
I've just started using NGUI and found it super cool with design UIs. However I just got some weird issues today and had no idea what exactly could cause the problem.
My game's images are designed for 1200x800px resolution and in UIRoot script of my UI I set Scaling Style "FixedSizeOnMobiles", Manual Height "1200", Minimum Height "1200". And there is no problem when I run the game in Unity simulator, the issue occurred when the game played on an android device with resolution 480x320px.
(See attached screenshot please)
I got two buttons at the bottom of the screen (the ninja pic and the shuriken one).
It looked like the collider boxes of these two buttons were "moved" a bit toward center of the stage, or what I thought was due to NGUI auto scaling stuff (not really sure since I already tested with 480x320px resolution in Unity simulator with no problems found).
Anyone already had same problem, or have some ideas on this please?
Sorry if I didn't make it clear enough and thanks for any suggestions!
Cheers.

Pages: [1]