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

Pages: [1] 2 3
NGUI 3 Support / Render Queue Issue
« on: January 12, 2016, 04:50:17 PM »

I've updated Unity to 5.3.1 and currently have NGUI 3.9.6 (just updated from the store) and something strange is happening. I got a particle system that I want in front of NGUI, and therefore, I have a shader that basically has "Queue"="Transparent+500", and whenever I want to use a particle in front of NGUI, I use this shader and thats it.

However... since the Unity update, which I dont know how but somehow screwed things up, now SOME materials with this shader are being drawn in front of NGUI, others arent. Same shader on all materials... its just not consistent. Tried raising the number to ridiculous amounts like Transparent+5000000 but no change at all...

Any clue as to how NGUI com possibly be drawn in front of something with a ridiculously high render queue? Btw I checked the Draw Call window and no panel is more than 3020˜ render queue...

Thanks in advance for the attention,

NGUI 3 Support / Window resize based on content
« on: November 18, 2015, 04:55:48 PM »

I've been using NGUI for quite some time now and always avoided doing this... but now would be a good time to know if there is an "easy way" to do it. What I want to achieve is this:

Imagine that the background is a widget, the items inside are ordered by a grid, and I want the grid to control the size of the parent widget, based on how many items are in the grid. Is there an "automatic" way to do it? I know it wouldnt be hard to calculate the size based on the widget's variables, but what if this was a Table for exemple? Is this at all possible by "NGUI Native" ways?


NGUI 3 Support / Re: UISprite not changing colors
« on: June 01, 2015, 11:10:31 PM »
Unfortunately thats not the case. I have a custom "button" script on it, and it is the only script affecting the colors of the sprite. It affects all widgets recursively, thats why the text inside is getting grayed out. What I don't understand is that I am using this same script across the whole project (not a small game, tons of buttons lol), and this is the only case this is happening... mostly I'm not even using NGUI tweens (even though they are awesome, I'm using Hotween because this is what everyone is using on the project), and everytime I start a tween on the color or any component I kill the previous tween so I make sure there is no conflict.

What I think is strange is that it does tween to the right color... it just doesnt show up... can this be related to something like executing on awake/start, idk...?

NGUI 3 Support / UISprite not changing colors
« on: May 31, 2015, 05:02:27 PM »

I am tweening the color of a Sprite, tried using both NGUI tweener as HOTween, but both yield the same result on this SPECIFIC sprite. I have a "UIButtonEnhanced" script that I use on all buttons along the project, and it works perfectly... but THIS specific sprite... is not applying the changed color.

Here are a couple of images:

Here is what is happening. The sprite has the gray color, it shows the gray color on the editor... but the color is not being applied to the sprite at all.

Here I just moved like 1 pixel in the Color palette and the sprite finally got the color as it should be, becoming this "dark yellow".

I tried absolutely everything... changing panel configs, refreshing the panel manually... nothing works. I'm using NGUI 3.8.2 and Unity 4.6.4f1, and this happened before but this time I just cant get this to work.

PS: As you can see, the UILabel inside is being changed, and is gray instead of white.


NGUI 3 Support / Particle System as part of NGUI
« on: March 09, 2015, 01:15:59 PM »

I'm trying to place a few particle systems inside my HUD, as feedback from clicks, selected items, etc, however as you can imagine, it is not as easy as it sounds. By toying with queue order of the particle additive/alpha blended shaders, I managed to get the particles into the correct render order in relation to NGUI... that is, in from of some stuff, behind other stuff. However, the problem is that sometimes I have particle systems inside Scrollable content, inside a clipped panel. As you can also imagine, the particles show up even if they are outside of the visible area in the panel, because they are not clipped by it.

Is there a way to make particles be affected by the panel clipping of NGUI? Maybe something with the shader...?


Other Packages / HUD Text - Multiline?
« on: January 27, 2015, 01:01:44 AM »

Im trying to use the HUDText script as a "log shower", so basically multiple scripts ask for a log, it is shown in the screen at the hud text position, and HUDText neatly moves them up if needed to. However, I altered a bit of the script to change the default label created by it, including changing it from ResizeFreely to ResizeHeight, but, as you can imagine, when a log with 2+ lines show up, they just get one over the other.

Is there some easy way to fix this, maybe change the offset calculation a little bit?

Anyway, thanks!

NGUI 3 Support / Re: UIFollowTarget question
« on: December 05, 2014, 12:53:31 PM »
Im sorry, I asked before I tried... got it to work the way I want it to, thx anyway!

PS: If I could suggest something, I would suggest that you add this feature, its ultra simple to do, and is pretty useful.

NGUI 3 Support / UIFollowTarget question
« on: December 05, 2014, 12:35:55 PM »

If I remember correctly, some time ago I managed to have a sprite with UIFollowTarget to always remain in the screen, just in the right direction towards the target it was supposed to follow, and if I remember correctly, it was something built in, but apparently I cannot find it anymore. Is this feature still present? Think like an arrow always pointing to your destination, in the borders of the screen, even if its not visible. Right now all I see are the options to turn on/off the game object in the fact that its visible or not, but the sprite leaves the screen regardless.

Is there an easy way to achieve this?

Thanks for your attention,
Best regards,

NGUI 3 Support / Re: Anchoring problem
« on: September 30, 2014, 06:25:41 PM »
Forget it, I found the problem...

There were a few elements in the hierarchy that didnt have a scale of 1... wow didnt expect that to be the reason but, its working perfectly now =)


NGUI 3 Support / Anchoring problem
« on: September 30, 2014, 05:14:45 PM »
Hello, how are you?

This anchoring system is great and allows us to do awesome things, however I'm not sure if its a bug, something not expected happening or if I am doing something wrong. I attached a couple screenshots... but basically what happens is this. I have a widget in the middle of 2 other widgets. I want this widget to be anchored to both of those... so if I move the one on the left, the left size of the middle widget should follow, and the same goes for the right one. Currently, what is happening is what is shown in the screenshots. Its as if the anchoring was not "pixel perfect" but somehow "in percentage"... I would like that the size between the the widgets to remain the same, and to stretch the one in the middle as necessary.

I'm not sure if I was clear enough with my explanation =P but I hope that the screenshots show what I mean.

Thanks for your attention,
Best regards,

Other Packages / Re: HUDText blinking when following main character
« on: August 12, 2014, 10:36:07 AM »
Thanks, even though LateUpdate/Execution time did solve the problem, I will try it out. However it was blinking a lot more than 1 pixel, more like 30-40 pixels a time...

But anyway, thanks!

Other Packages / Re: HUD Text curves
« on: August 11, 2014, 04:54:42 PM »
Okay got another part of it... there is a "Mathf.Max(offset, ent.offset)" which prevents the offset from being negative...

Another question though, what should I change if I want new texts to push older texts down, instead of up?

I tried changing:

offset += Mathf.Round(ent.label.cachedTransform.localScale.y * ent.label.fontSize);


offset -= Mathf.Round(ent.label.cachedTransform.localScale.y * ent.label.fontSize);

Based on a bool value, but didnt work, its not pushing older texts up, but its not pushing down either...


Other Packages / Re: HUD Text curves
« on: August 11, 2014, 04:11:56 PM »
Okay I think I got part of it... the value we send on the Add() call is actually how long it should stand still, before the curves are considered... and the length of the text is actually the size of the biggest curve... hmmmm now Im beginning to understand... =P

Other Packages / HUD Text curves
« on: August 11, 2014, 03:05:00 PM »

Just making a new thread to keep it separated as it is a completely different question... but... how exactly do the curves on HUD text work? I mean, Offset, Alpha and Scale curves?

I've been toying around with them but it does not seem like they are being obeyed in a logical way lol... so first and foremost, I suppose the axis are:

For Offset:
Y = Pixels
X = Time

For Alpha
Y = Inverse of Alpha (1 = invisible, 0 = visible)
X = Time

For Scale
Y = Value
X = Time

Is that correct?

Assuming that it is... on the Offset curve one of the problems I have is that I made a simple, linear curve from 0 to -40 during 3 seconds, but the displayed text for some reason is still floating up instead of down... how??

For the alpha curve, did I get it right, is it the inverse of what is expected, like 0 alpha actually means 100% visible? Also, I made a curve that starts and ends on 0 but apparently after the curve is through, the code assumes and make another fade out... does that make sense? Like, my curve ends on 1, and in the game the text apparently follows the curve and in the end when it should be invisible, it turns visible again and then fade out again... is this the expected behaviour?

No problems with the scale curve gladly =P

Anyway, thanks for the attention,
Best regards,

Other Packages / HUDText blinking when following main character
« on: August 11, 2014, 02:14:46 PM »

Im implementing Hud Text on my game and it works perfectly for enemies, however the player's hud text is, like the other guy mentioned, "shaky"... it doesnt follow the main character smoothly.

The main character is rendered by the main camera, which moves with him, and Hud Text is rendered by the UI Camera, which is stationary, and is the same camera that renders the rest of the UI done also with NGUI.

I am currently using NGUI version 3.6.9 and HUD Text version 1.12.

Any ideas on how I can fix that/why this is happening? Unlike the post from the other guy it happens when I walk but regardless of collisions or stuff like that, just the generic walking, which by the way is exactly the same code I use on my enemies to move, the same class.

EDIT: Tried changing HUDText from Update to LateUpdate and placing it in the last place in the Execution Order... no change =/


Pages: [1] 2 3