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

Pages: [1] 2 3 ... 6
1
NGUI 3 Support / prefab widget depth
« on: April 26, 2016, 11:15:27 AM »
Why don't widgets display depth when they're not in the scene heirachy? (ie. when you can inspect them as prefabs in the project view).  Depth data is serialized in the object so seems like a bug. If by design, why?

2
NGUI 3 Support / Re: UIScrollPanel & mPanel
« on: April 22, 2016, 06:32:59 AM »
it's getting called from OnEnable in a parent object script.

why wouldn't you want to add a null check? there's null checks for mPanel in the same script - presumably there are other times when mPanel is null and you don't want an exception.

3
NGUI 3 Support / UIScrollPanel & mPanel
« on: April 20, 2016, 10:52:20 AM »
the function UIScrollPanel.RestrictWithinBounds() uses mPanel before its initialized, normally mPanel is inited in awake but in some circumstances RestrictWithinBounds is called before that. Can you add if (mPanel == null) mPanel = GetComponent<UIPanel>(); before mpanel is used in that method?

Thanks

4
NGUI 3 Support / Re: Clipping with Additive Shader
« on: June 01, 2015, 07:53:40 AM »
for ref, the blend mode for transparent additive is:

  1. Blend SrcAlpha One
  2.  

5
NGUI 3 Support / Fonts && Outlines
« on: April 14, 2015, 06:06:17 AM »
Hi,

Is it possible to have the font outline effect on the inside of the font? (say if I use a negative value for the thickness of the outline I might expect it to appear inside the characters?). The reason I might want to do this to keep the fonts cleaner, for example if I have colon character an outline on the outside causes the dots in he colon to merge thereby making the character more difficult to read.

Also what would be really cool is if we could have the drop shadow and the outline effects at the same time? (You can achieve this by duplicating the UILabel but that would really suck having to double up gameobject everywhere)

Thanks

6
NGUI 3 Support / Re: UITweener gets disabled before running (bug)
« on: February 24, 2015, 11:18:06 AM »
I'll look out for the release version with a fix in it.

Thanks

7
NGUI 3 Support / Re: UITweener gets disabled before running (bug)
« on: February 23, 2015, 05:39:09 AM »
*bump*

I have a work around for this but I do think the issue should be resolved within NGUI

8
NGUI 3 Support / Re: Font.CacheFontForText Causes Lag - NGUI Fonts
« on: February 18, 2015, 11:37:01 AM »
when loading the game, I create a label with each glyph from the from the font at the size I'm going to be rendering the fonts at. ie. the label will never be displayed but contains the text aAbBcCdD...xXyYzZ123456 etc

This forces the dynamic fonts to be cached for me.

Be sure not to have "keep crisp" option off since that can also force the fonts to re-cache if the label ever scales.

9
NGUI 3 Support / UITweener gets disabled before running (bug)
« on: February 18, 2015, 08:12:20 AM »
OK I am going to describe the scenario that happens then my explanation as to why it's happening, and hopefully you can fix it.

I discovered this in on iOS but am able to repro it in the editor. (Latest version of NGUI as of time of writing)

* I have a gameObject with alpha tween on it.  It is currently not enabled. (The tween duration is short - 0.25s and is set to play once)
* With the game running I leave the editor (the application pauses)
* I return to the editor (application resumes) and within the first frame I invoke my tween (via an OnClick event)
* The tween does not occur (and any OnFinish delegates are omitted also)

Having debugged a bit I figure whats happening (see  ***comments***):

My code:
void OnClick() {
myTween.ResetToBegining();
myTween.PlayForward();
}

NGUI UITweener Code:
  1. void Update ()
  2.         {
  3. *****************************delta time is the time period which I the application was paused, say 10.0f sec****************************************************
  4.                 float delta = ignoreTimeScale ? RealTime.deltaTime : Time.deltaTime;
  5.                 float time = ignoreTimeScale ? RealTime.time : Time.time;
  6.  
  7.                 if (!mStarted)
  8.                 {
  9.                         mStarted = true;
  10.                         mStartTime = time + delay;
  11.                 }
  12.                
  13.                 if (time < mStartTime) return;
  14.  
  15. *****************************calculated mFactor far too high, should be zero****************************************************
  16.                 // Advance the sampling factor
  17.                 mFactor += amountPerDelta * delta;
  18.  
  19.                 // Loop style simply resets the play factor after it exceeds 1.
  20.                 if (style == Style.Loop)
  21.                 {
  22.                         if (mFactor > 1f)
  23.                         {
  24.                                 mFactor -= Mathf.Floor(mFactor);
  25.                         }
  26.                 }
  27.                 else if (style == Style.PingPong)
  28.                 {
  29.                         // Ping-pong style reverses the direction
  30.                         if (mFactor > 1f)
  31.                         {
  32.                                 mFactor = 1f - (mFactor - Mathf.Floor(mFactor));
  33.                                 mAmountPerDelta = -mAmountPerDelta;
  34.                         }
  35.                         else if (mFactor < 0f)
  36.                         {
  37.                                 mFactor = -mFactor;
  38.                                 mFactor -= Mathf.Floor(mFactor);
  39.                                 mAmountPerDelta = -mAmountPerDelta;
  40.                         }
  41.                 }
  42.  
  43.                 // If the factor goes out of range and this is a one-time tweening operation, disable the script
  44. *****************************calculated mFactor too high, should be zero****************************************************
  45.                 if ((style == Style.Once) && (duration == 0f || mFactor > 1f || mFactor < 0f))
  46.                 {
  47.                         mFactor = Mathf.Clamp01(mFactor);
  48.                         Sample(mFactor, true);
  49.  
  50.                         // Disable this script unless the function calls above changed something
  51.                         if (duration == 0f || (mFactor == 1f && mAmountPerDelta > 0f || mFactor == 0f && mAmountPerDelta < 0f))
  52.                                 enabled = false;********************************* never had a chance to this tween in action *********************************
  53.  
  54. *********************************************** well atleast our OnFinish delegate is called not breaking any game logic *********************************
  55.                         if (current == null) ***************** oh wait, current is static and not null (we can't invoke other tweens from OnFinish?!)************************
  56.                         {
  57.                                 current = this;
  58.  
  59.                                 if (onFinished != null)
  60.                                 {
  61.                                         mTemp = onFinished;
  62.                                         onFinished = new List<EventDelegate>();
  63.                                        
  64.                                         // Notify the listener delegates
  65.                                         EventDelegate.Execute(mTemp);
  66.                                        
  67.                                         // Re-add the previous persistent delegates
  68.                                         for (int i = 0; i < mTemp.Count; ++i)
  69.                                         {
  70.                                                 EventDelegate ed = mTemp[i];
  71.                                                 if (ed != null && !ed.oneShot) EventDelegate.Add(onFinished, ed, ed.oneShot);
  72.                                         }
  73.                                         mTemp = null;
  74.                                 }
  75.  
  76.                                 // Deprecated legacy functionality support
  77.                                 if (eventReceiver != null && !string.IsNullOrEmpty(callWhenFinished))
  78.                                         eventReceiver.SendMessage(callWhenFinished, this, SendMessageOptions.DontRequireReceiver);
  79.  
  80.                                 current = null;
  81.                         }
  82.                 }
  83.                 else Sample(mFactor, false);
  84.         }
  85.  
  86.  

Thanks

10
Misc Archive / Made with NGUI
« on: February 06, 2015, 11:15:04 AM »
Hi,

It'd be nice to get a sticky here for people to post their games made with NGUI.

We released our game Pocket Shrek yesterday on the app store.

It's f2p and you can give it a play here:
https://itunes.apple.com/app/pocket-shrek/id886216658?mt=8

Thanks

11
NGUI 3 Support / Re: color gradient sprites
« on: October 28, 2014, 03:22:29 PM »
I don't think an overlayed component is going to do any favours to fill rate, also what if the thing I want to gradient has alpha in it?, the gradient would be applied to anything behind it, thanks for the suggestion tho

12
NGUI 3 Support / color gradient sprites
« on: October 28, 2014, 06:47:09 AM »
didn't want to bring this thread back to life...
http://www.tasharen.com/forum/index.php?topic=8918.0
but...
I think gradient sprites would be very useful! I disagree that adding it to uisprite would clutter the inspector, I'd imagine a simple check box to disable/hide the gradient if it's not used.  It would be immensely useful in allowing variation to UIs while keep the atlas size to a minimum.

13
NGUI 3 Support / MouseOrTouch
« on: September 12, 2014, 10:19:45 AM »
Hi Aren,
Is it possible to get a deltaTime added to the MouseOrTouch class? To represent the length of time since the mouse or touch started

There's a clickTime that seems to only work for desktop, (i.e. not mobile)

Ideally I would like the equivalent to this:

Input.GetTouch(0).deltaTime;

Thanks in advance

14
NGUI 3 Support / Re: NGUI and Unity 5
« on: September 12, 2014, 06:42:21 AM »
I believe the link is distributed to a private beta group but is public to download, so I guess it's about who you know

15
NGUI 3 Support / Re: Sprite Atlas Broken on IOS (Fixed)
« on: September 12, 2014, 06:26:13 AM »
I'm curious, why is the UV in pixels not float?  if they were float:[0,1] then it would work irrespective of the atlas size

Pages: [1] 2 3 ... 6