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

Pages: [1]
1
NGUI 3 Support / Re: NGUI in preview window
« on: June 27, 2017, 03:52:12 PM »
Most of it's on the UI layer (builtin layer 5), and the rest are on additional custom layers (24 and 25). NGUI elements on all three layers appear in the preview window.

The preview model is on the Default layer. The issue also occurs when previewing imported FBXs which have no layer.

Changing the layer of the UI root and all children doesn't seem to fix the issue. When I create non-NGUI objects on the UI layer under my UIRoot, they don't appear in the preview window.

2
NGUI 3 Support / NGUI in preview window
« on: June 26, 2017, 11:15:06 PM »
I'm seeing NGUI appear in my animation preview window!

It seems to occur specifically for NGUI objects at the origin. When I disable NGUI root, the objects no longer appear in the window.

Issue seems specific to NGUI- other objects (3d objects, Unity sprites/UI elements) at the origin don't appear.

Replicated with NGUI 3.11.4 on Unity 5.6 and 2017.1.0f1

Seems like this was raised a few years back
http://www.tasharen.com/forum/index.php?topic=5159.0

3
NGUI 3 Support / UITweener bug
« on: August 30, 2016, 12:26:38 PM »
Hey Aren,

I ran into an issue with using the Tween functions in this block (3.10, UITweener.cs):

  1.         public float amountPerDelta
  2.         {
  3.                 get
  4.                 {
  5.                         if (duration == 0f) return 1000f;
  6.  
  7.                         if (mDuration != duration)
  8.                         {
  9.                                 mDuration = duration;
  10.                                 mAmountPerDelta = Mathf.Abs(1f / duration) * Mathf.Sign(mAmountPerDelta);
  11.                         }
  12.                         return mAmountPerDelta;
  13.                 }
  14.         }
  15.  

When reusing a tweener and switching between a zero and non-zero duration, mDuration doesn't update correctly, causing mAmountPerDelta to lock at 1000.

For example:

TweenScale.Begin - duration = 1, mDuration = 1, amtPerDelta = 1 - OK
TweenScale.Begin - duration = 0, mDuration = 1, amtPerDelta = 1000 - mDuration should've changed to 0, this will become a problem on the next run
TweenScale.Begin - duration = 1, mDuration = 1, amtPerDelta = 1000 - amtPerDelta isn't updated since duration == mDuration, subsequent transitions occur instantaneously

Let me know if this isn't clear, thanks!

4
Hi,

Sorry to necro this- I'm a bit confused on this one as well. Here's my problem code:

  1. // called in ConfigManager.Start()
  2. void LoadConfig()
  3. {
  4.         Display.Brightness = savedBrightnessValue;
  5. }
  6.  
  7. // in myBrightnessSlider OnValueChange
  8. void OnBrightnessSliderChanged()
  9. {
  10.         Display.Brightness = UISlider.current.value;
  11. }
  12.  

The sequence:
Config.Start() is called - display.brightness is set
OnValueChanged delegate invoked via UIProgressBar.Start() - display.brightness is set again to default slider value

What's the recommended practice here?

5
NGUI 3 Support / Preventing clipping for specified widget
« on: February 19, 2015, 03:44:44 PM »
Hello,

Is there any way to prevent a UIWidget that's under a parent panel with clipping turned on from being clipped? I have a widget that needs to be clipped, and a child widget that shouldn't be.

As of now I set the child widget to a different parent panel and sync the position using anchors, but was wondering if there was an easier way this could be done.

Thanks!

6
Misc Archive / [Showcase] Liege - Made with NGUI
« on: September 14, 2014, 04:49:14 PM »
Just released an update on our devblog covering our character management and system UI. Figured I'd share here for anyone interested- thanks for the awesome tool and support!

http://youtu.be/VeZyewemlUc






7
NGUI 3 Support / Re: Dynamically changing sliced sprite
« on: September 04, 2014, 05:35:49 AM »
Disregard, disabling pixel snap on the button did the trick.

8
NGUI 3 Support / Dynamically changing sliced sprite
« on: September 04, 2014, 05:24:55 AM »
Hi,

What is the correct way to change the sliced sprite for a button in code while retaining its original dimensions? I tried something like below which seems to work at first, but when I hover out of the sprite and back into it, the size resets.
  1.         void PushIn(UIButton button)    {
  2.                 UIWidget widget = button.GetComponent<UIWidget>();
  3.                 int width = widget.width;
  4.                 int height = widget.height;
  5.                 button.normalSprite = "UI.glass.card.pressed";
  6.                 widget.width = width;
  7.                 widget.height = height;
  8. //              widget.MarkAsChanged();
  9. //              widget.SetDirty();
  10.         }
  11.  
Thanks-

9
NGUI 3 Support / Re: OnClick/Hover with overlapping colliders
« on: September 03, 2014, 08:04:26 PM »
Perfect, thanks.

10
NGUI 3 Support / OnClick/Hover with overlapping colliders
« on: September 03, 2014, 05:17:23 AM »
Hi,

I have a button which is contained in a parent widget that changes color on hover.

I've set the depth of the button to greater than the parent widget so clicks register, but this breaks the parent's OnHover color changing when the cursor's within the button's bounds.

Is there a simple way around this? The easiest way I've found was to set the parent as the button's tween target with matching colors, but this prevents me from color tweening on the actual button.

Thanks!

11
NGUI 3 Support / Re: wrapping UIGrid contents
« on: July 28, 2014, 02:58:13 AM »
Ok thanks- here's the script I came up with in case anyone's interested.

  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class UIGridWrapping : UIGrid {
  5.  
  6.         void Start()    {
  7.                 UpdateMaxPerLine ();
  8.                 base.Start ();
  9.         }
  10.  
  11.         [ContextMenu("Execute")]
  12.         public override void Reposition()       {
  13.                 UpdateMaxPerLine();
  14.                 base.Reposition ();
  15.         }
  16.  
  17.         void UpdateMaxPerLine() {
  18.                 maxPerLine = (int) (GetComponent<UIWidget>().width/cellWidth);
  19.         }
  20. }
  21.  

12
NGUI 3 Support / wrapping UIGrid contents
« on: July 27, 2014, 10:33:41 PM »
Hi Aren,

I have a horizontal UIGrid with a column limit of 3. I'd like to have the grid contents wrap onto additional rows if the combined cell width exceeds the grid widget dimensions (example attached). Is this possible currently out of the box? Would like to check before scripting something.



Thanks!

13
NGUI 3 Support / UISprites in world space/UIPanel performance
« on: April 15, 2014, 12:35:54 PM »
Hello,

I'm trying to create UISprites in world space underneath my characters (flat on the ground). The approach I've been able to get working after some reading on the forum is basically:

CharacterObject
- UIPanel
-- UISprite

Just wanted to confirm- is this the best approach to accomplish this? I'm a little concerned about performance, since I'd need to create a UIPanel for every character on screen. Would it be possible (better?) to use a single UIPanel and update the sprite positions to the characters'?

Thanks!

Pages: [1]