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

Pages: [1] 2
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 / 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

3
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

4
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

5
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

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

7
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

8
NGUI 3 Support / drag drop with clone gameobject
« on: September 09, 2014, 06:33:07 AM »
drag drop with clone option seems broken in the latest (3.7.1)

tested this with example 11, change one of the scolls items to clone on drag and the item will not drag, it is stuck inside the scroll view

9
NGUI 3 Support / NGUITools.PlaySound pitch bug
« on: September 02, 2014, 11:45:59 AM »
Hi Aren, I noticed if I play a audioclip using the NGUITools.PlaySound(someClip, 1, 0.05) then play another audioclip with another pitch (say pitch = 1) before the first audio clip has finished then the pitch if the first audio clip changes to 1 instead of 0.05 (ie. doesn't play as I set it too).

Appologies for the short explanation!

Thanks

10
NGUI 3 Support / scrollviews and content origin
« on: August 11, 2014, 10:11:57 AM »
Hi,

I have a scrollview that is ancorhed to the UI root. I find that the content origin is not updating when I change the screen width/height.  Content origin only updates the transform of the scrollview when the user changes it in the editor.

See attached scene/project for example.

Thanks

11
Hi Aren,
Is there anything that could be done re the atlas textures being created as trilinear textures? I'm not implementing a 3D ui so have having the trilinear filtering enabled is something I have to remember to change every time I update an atlas.  (I've not tested performance wise but trilinear will be doing more texture sampling than bilinear so in theory it's going to be slower). So maybe we can have an NGUISettings option to remember the users filter mode preference? or only set trilinear filtering if mipmaps are enabled? or you could grab the current filtering mode from the texture before updating/replacing it?

thanks

12
NGUI 3 Support / bug: Scrollview bounds
« on: July 29, 2014, 11:06:27 AM »
Hi Aren,

Calling UIScrollview.ResetPosition() invalidates the mBounds such that the next time bounds property is accessed the bounds are recalculated.  I find that when I call this function (on re-populating a table) that the bounds are only calculated when I drag the table with the mouse, however if move the contents of the table with the mouse wheel the bounds property is never re-calculated and the table scrolling is broken.

Something else I noticed when going though UIScrollview was:
  1. /// <summary>
  2. /// Manually invalidate the scroll view's bounds so that they update next time.
  3. /// </summary>
  4.  
  5. public void InvalidateBounds () { mCalculatedBounds = true; }
  6.  

Unless I'm mis-understanding something, that should be "mCalculatedBounds = false" to make the bounds property re-calculate, I wasn't using this function so didn't test it. 
(summary is a little vague here as well, "next time" could mean alot of different things i.e. next update, late update etc)

thanks

13
NGUI 3 Support / atlas and iOS texture compression
« on: July 24, 2014, 05:01:08 AM »
Hi, I'm finding that enabling texture compression on iOS is corrupting my atlas. I know that true color texture is preferable for quality but I need reduce the size of my assets :/  I have an atlas that when created is 2048x1024, I set it to compressed and this changes the texture to 2048x2048 which corrupts the atlas UV/pixel coords.  I'm thinking of adding a single texture of 1x1025 to force the atlas to be created at 2048x2048, is there a better solution to this problem?

many thanks

14
NGUI 3 Support / Property Binding and memory allocations
« on: May 29, 2014, 04:06:10 AM »
Hey Aren,

Are you aware that the property binding are allocating memory in their update?

I have 20 property binding in my scene and getting 1k memory alloc per update.

Thanks

15
NGUI 3 Support / property binding and read only properties
« on: May 22, 2014, 10:06:37 AM »
Hi,

I am finding that I can't set a read only property as the source of a property binding.

ie. if the component I try use as a source has the following read only property:
   
  1. public string LevelDescription {
  2.                 get {
  3.                                 return "Lv." + _Level;
  4.                 }
  5.         }
LevelDescription wont appear in the dropdown in the source property binding component in the editor.

if I change it to:
       
  1. public string LevelDescription {
  2.                 get {
  3.                                 return "Lv." + _Level;
  4.                 }
  5.                 set {}
  6.         }
then that property is now available in the dropdown of available properties and fields.

Bug or as per design?  (I can imagine that it might be a requirement for bi-directional data binding but that's something I may not be using)

thanks

Pages: [1] 2