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

Pages: [1] 2 3 ... 7
1
Brackets indicate color code, or other codes for bolt, italic, etc.

http://www.tasharen.com/?page_id=166

2
NGUI 3 Support / Re: UIPanel error
« on: September 05, 2014, 06:29:30 AM »
Hrm... we need a 'best practices FAQ' or something, because I honestly don't know.

3
NGUI 3 Support / Re: UIPanel error
« on: August 29, 2014, 06:16:59 PM »
Uh, just disable the gameobjects when you don't need them.

If you need to still send messages to objects when they aren't seen, then set the panel alpha to 0 and/or disable it and have a script recursively disable all the colliders.

4
NGUI 3 Support / Re: UICheckbox
« on: August 29, 2014, 06:15:27 PM »
UIToggle

UICheckbox was so 2013 (or sure seems like it.)

5
NGUI 3 Support / Re: How do you use tooltip?
« on: August 29, 2014, 06:14:55 PM »
You have to roll your own for more options, but the basics are:

  1.     void OnTooltip(bool show)
  2.     {
  3.         if (show)
  4.         {
  5.             ShowText("Some text");
  6.         }
  7.         else
  8.         {
  9.             ShowText("");
  10.         }
  11.     }

Setting the value to empty string or null makes the tooltip go away.

6
NGUI 3 Support / Re: UIInput Caret Manipulation
« on: August 26, 2014, 06:54:14 AM »
Could you please change the Update() in UIInput to protected virtual?

I'd like to just override it instead of having to make updates every time I, well, update.  Will make things much smoother.

7
NGUI 3 Support / Re: UIInput Caret Manipulation
« on: August 26, 2014, 06:43:23 AM »
Well, not the most fun thing to figure out.

Changing the selectionStart / selectionEnd did nothing, as they were already being set during the OnSelect event, so it was too late... or something, I don't know.  CursorPosition did nothing too.

I had to update the UIInput Update to where it is selected the first time, change the mSelectionStart equal to mSelectionEnd, only when the platform is WindowsPlayer.

Just another custom thing to add I suppose, ah well.  Figured it out, I hope... until I make an OSX build and nothing works again, or webplayer, or whatever.  So annoying.

Thanks again for the assistance.

8
NGUI 3 Support / Re: UIInput Caret Manipulation
« on: August 25, 2014, 01:01:07 PM »
The issue that would never end...

I have found that as started earlier, the change you helped out with worked; however, I've found out it only works in the editor.

x86 build, at runtime, this does not actually work.  It gives focus to the UIInput but the character I want added isn't there.

To ensure this wasn't some hodgepodge part of my code, I made a new project, imported NGUI, added only a UIInput, and wrote a very simple code:

  1. if (Input.GetKeyDown(KeyCode.Slash))
  2. {
  3.     input.isSelected = true;
  4. }

That's it.  I'm not even disabling the UIInput or anything.  It gives it focus but I want the typed character to show up in it too.  Adding it via code highlights it, so if you were to type (slash-key) then another letter, the slash key is overwritten.

Haven't tried other platforms, just PC right now.

9
NGUI 3 Support / Re: Tabbing between UIInput fields... issues and ideas
« on: August 25, 2014, 12:54:50 PM »
Been meaning to write a similar post.

It'd be nice to have.

10
NGUI 3 Support / Re: I want to know about future of NGUI
« on: August 24, 2014, 06:55:32 AM »
Powerful in regards to being integrated into Unity.  I don't recall where I read it, but it can access native things and do stuff more efficiently than an add-on asset.  Very vague, I know, I don't remember the details.

Of course, with the new GUI being open-sourced, NGUI could/can take advantage of whatever it is.

11
NGUI 3 Support / Re: I want to know about future of NGUI
« on: August 22, 2014, 08:21:16 AM »
While the new UI looks cool and definitely more "powerful", here is why I'm not switching any time soon:

1.  Have to rewrite a UI (some people might not be as far along and this doesn't matter as much)
2.  Unity UI will have bugs in it, regardless of the 30ish betas + public beta
3.  While Unity new patching updates are great, it has not quite restored my faith in timely updates/fixes
4.  Lack of documentation for new UI system on how to do complex tasks


12
NGUI 3 Support / Colliders and Alpha
« on: August 22, 2014, 08:16:55 AM »
Attempting to create "invisible" collider for UI.

Attempt 1:  UIWidget + Collider = fail
Attempt 2:  UISprite (Alpha 0) + Collider = fail
Attempt 3:  UISprite (Alpha 1/255) + Collider = success

I have it working and that's great, just wondering why UICamera.lastHit.collider doesn't register unless there is some alpha there, or am I mistaken?  Didn't change any other settings.

Mmmm... addendum, the panel is set to "Visible" so I am guessing it's checking for a visible component.  Not 100% sure, but this makes sense.  Will have to test more later.

13
NGUI 3 Support / Re: UIInput Caret Manipulation
« on: August 17, 2014, 02:42:48 PM »
Worked like a charm.

Thank you!

14
NGUI 3 Support / Re: UIInput Caret Manipulation
« on: August 16, 2014, 04:28:32 PM »
Not a necro post, this seriously just stopping working as expected.

  1.             if (!m_uiInputChat.gameObject.activeSelf && Input.GetKeyDown(KeyCode.Slash))
  2.             {
  3.                 Debug.Log("Input chat activating due to '/' input");
  4.                 if (m_uiInputChat.isSelected)
  5.                     return;
  6.                 m_uiInputChat.gameObject.SetActive(true);
  7.                 m_uiInputChat.isSelected = true;
  8.             }

Code hasn't changed since I resolved the issue in here previously, have updated NGUI a few times, now it's not working out so well.

Any ideas?

Trying to get a character (a slash in this instance) to appear in the input box when you press the same button.

15
NGUI 3 Support / Re: changing sprite2D image at run time
« on: August 06, 2014, 08:35:59 AM »
http://docs.unity3d.com/ScriptReference/Resources.LoadAssetAtPath.html

It says it's Editor Only.

Why isn't the sprite in part of an atlas, and you just... change the sprite?


Pages: [1] 2 3 ... 7