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

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

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,
Cya

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

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:

http://www.teeteehaa.de/gc/gamescom2010/images/guildwars2-skills8-feralsignet.jpg

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?

Thanks!

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

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.

Thanks!

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

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...?

Thanks!

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

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!

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

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,
Allan

7
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,
Allan

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

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,
Allan

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

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 =/

Thanks,
Regards,
Allan

10
NGUI 3 Support / UILabel Height
« on: February 19, 2014, 01:21:32 PM »
Hello,

In NGUI 2.X I remember using something like label.relativeSize.y and that would return the number of lines of the text, which I could use * the height of each line to get the total height of the text. However, I understand that thats changed, and we should use uilabel.height to get the value in pixels. However, heres the problem:

  1. //initially myLabel.text is something equivalent to 1 line of text
  2. print(myLabel.height); //Output 10 (for example, considering 10 pixels per line)
  3. myLabel.text = "asdasdasdasdassad"; //equivalent to 2 lines of text
  4. print(myLabel.height); //Output 10 again, as if size wasnt updated
  5.  

What I am doing to get the correct value is yield return null, but I would appreciate if I didnt have to wait for a frame and use coroutines for everything. Is it possible to get the updated height immediately?

Thanks for your attention,
Best Regards,
Allan

11
NGUI 3 Support / Regular model in between NGUI layers?
« on: December 16, 2013, 05:39:16 PM »
Hello, how are you?

I've noticed that since NGUI 3.0 the Z vs Depth has changed quite a lot, which on one side I find good and on the other it is causing me a bit of trouble.

Truth is I dont use NGUI for everything HUD related in my scene. The extra drawcalls I get from using primitive shapes with textures sometimes compensate for the UIPanel.Update when things are moving, so I actually try to avoid using NGUI for (mostly) static stuff. However, the real problem is when I try to have something in the middle of NGUI sprites... I have a plane which gets a texture from Resources.Load (to use less memory and since it can be one in many images I cant have that on an Atlas), and it is a background image of an NGUI Popup. No problem there... however, there are a few NGUI elements that I wish were BEHIND this primitive plane... but since NGUI now ignores Z somehow, I dont know how to put this plane behind the NGUI popup and in front of the other NGUI HUD going behind...

Any ideas?

On the image bellow, I want the highlighted stuff behind the white plane.

12
NGUI 3 Support / Rigidbody in Panels
« on: December 11, 2013, 10:16:16 PM »
Hello,

I understand why you had rigidbodies attached to panels, they certainly do reduce the static collider calculation on move and at certain times we do have buttons moving around... BUT, the rigidbody also unifies the colliders as "one body"... its not really a merge but they count as one for collisions...

I've commented out the part of the code that adds the rigidbody, and I dont know if there is a real solution to the static collider problem, but I have a custom input script more suited for my needs and I just cant have that rigidbody there, unfortunately.

I would suggest making a bool on the panel script to add or not a rigidbody... i know it is pretty easy to just go there and comment the code, obviously, but I suppose I will have to do that in every release, and I am sure there are more people with this kind of problem other then me. Actually, is that the reason you've added the rigidbody in the first place, for the static collider move overhead?

Best regards,
Allan

13
Other Packages / HUDText - All letters Black
« on: July 09, 2013, 05:10:42 PM »
Hello,

I've purchased HUD Text and first of all I must say its awesome! Its been working great so far... however, I have a problem I have no idea what to do to fix.

The plugin works great on my pc, but there are some Android devices (I've tested on: Samsung Galaxy S2 (works great), Motorola Xoom (bugs), Asus Nexus 7 (bugs)) which show all letters as black squares. Since it is working on PC and even on Galaxy S2, I dont think I've done something wrong on my side, but Id like to know if this is a known bug, or I am really doing something wrong.

Thank you for your attention,
Best regards,
Allan

Pages: [1]