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

Pages: [1]
1
NGUI 3 Support / NGUI 3.0.8f7 update issue : currentTouch = null
« on: January 14, 2014, 04:31:27 PM »
I after updating, I found that the placement of some menu elements are a little off - no problem, I can just move them again - and UIButtonColor is now throwing a NullRefException.

I pinned the issue down to line 171 in UIButtoncolor.cs :
  1. else if (UICamera.currentTouch.current == gameObject && UICamera.currentScheme == UICamera.ControlScheme.Controller)

I haven't yet gone and looked at how NGUI has changed that I would now be getting this issue, just thought I would post it in case someone knows a quick fix.

Thanks in advance!  ;D

2
NGUI 3 Support / Animated Textures?
« on: December 10, 2013, 10:11:32 PM »
Hey Michael!

I remember watching a Unity Keystone video (I think that's what they are called) where you demonstrated a progress bar with an animated scrolling texture.

I have not found any examples of implementation, and it is too early to develop nice-to-haves, so I thought I would ask if you had any examples handy.

3
NGUI 3 Support / Bug with HP Bars
« on: December 09, 2013, 08:48:06 PM »
Since a few versions ago (I think 3.0.6f7) my HP Bars have started having some strange bugs.

Some context to the problem :

My player has a HP Bar anchored to the top-left of the screen. I also give every Enemy in the game a HP Bar(instantiated in code), and make the Bar invisible(via SetActive(false)) in Initialize. When an enemy takes damage for the first time (and so has 100%< HP), I make his HP Bar visible (by doing SetActive(true)).

As soon as I set an Enemy's HP Bar to Active, the player's HP Bar snaps to the center of the screen, as if gaining an offset from the top left. This lasts for 1 frame, and then it snaps back to normal. This happens every single time I set an enemy's HP Bar to Active




I have looked through my code, and there is code that moves the HP Bars of enemies, but no other UI elements have code that change their positions.

The NGUI hierarchy looks like this :

UIRoot (My code here for instantiating player HUD and enemy HP Bars)
-Camera
--Anchor
---Enemy HP Bars
---Players (UIPanel)
----Player 1 (My code here to manage HP Bars and other elements)
----- HP Bar


Please let me know if you require more details

Pages: [1]