Author Topic: tv os support - ui don't work properly  (Read 12069 times)

ssc_mikey

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
tv os support - ui don't work properly
« on: January 21, 2016, 08:12:07 AM »
Hi there.

I was trying to build my game to TV OS the other day. Unfortunately the ui buttons doesn't seem to work. I was not able to move and switch the active buttons in the menu. Somehow i managed to press a button by holding the touch on remote little longer.

So i wonder if NGUI plugin supports tv os and if so what is the way to deal with it.

Thank you
Mikey

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: tv os support - ui don't work properly
« Reply #1 on: January 25, 2016, 10:16:05 PM »
I can't say I've ever tried it, nor do I have a license to do so. Windward is available for Android, and runs on the NVIDIA Shield console which is attached to the TV, but that one uses a controller to navigate, not a TV remote. I don't know what the input is like on the TV OS.

ssc_mikey

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: tv os support - ui don't work properly
« Reply #2 on: January 26, 2016, 04:40:52 AM »
here is a good article about setting it up. As you know exactly how the NGUI input behave you might be able to come up with solution. I set it all up using unity canvas but that is not what i wanted and i have to rebuilt whole menu using this system. I will appreciate if you can have a look to it and let me know if you are able to fix it. NGUI is the NO1 plugin and i would like to use exclusively NGUI

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: tv os support - ui don't work properly
« Reply #3 on: January 26, 2016, 07:39:12 AM »
Did you forget to include a link?

ssc_mikey

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile

d3gator

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Re: tv os support - ui don't work properly
« Reply #5 on: February 09, 2016, 02:51:18 PM »
Any news about NGUI Apple TV support? Would be great to support some basic features, scroll view with swipe gestures for example.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: tv os support - ui don't work properly
« Reply #6 on: February 10, 2016, 05:17:23 PM »
No news yet.

bloomk

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 38
    • View Profile
Re: tv os support - ui don't work properly
« Reply #7 on: February 11, 2016, 07:28:48 PM »
I would like apple tv support also :)

bloomk

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 38
    • View Profile
Re: tv os support - ui don't work properly
« Reply #8 on: May 23, 2016, 10:53:02 AM »
How about now? i wold like it as well...

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: tv os support - ui don't work properly
« Reply #9 on: May 24, 2016, 05:04:44 PM »
Unfortunately I can't give you any ETA on this. As I mentioned, I don't have a license or means to test any of this, so the likelihood of me doing it are slim until I do. NGUI's input is fully moddable however, so any scripter could do it assuming they have the ability to test their changes. UICamera's input functionality is all delegated. In fact, current Pro version of NGUI lets you even overwrite GetTouch delegates. You can do that in your version of NGUI just by replacing UICamera.GetMouse, UICamera.GetTouch and UICamera.RemoveTouch functions with:
  1.         public delegate MouseOrTouch GetMouseDelegate (int button);
  2.         public delegate MouseOrTouch GetTouchDelegate (int id, bool createIfMissing);
  3.         public delegate void RemoveTouchDelegate (int id);
  4.  
  5.         /// <summary>
  6.         /// Get the details of the specified mouse button.
  7.         /// </summary>
  8.  
  9.         static public GetMouseDelegate GetMouse = delegate(int button) { return mMouse[button]; };
  10.        
  11.         /// <summary>
  12.         /// Get or create a touch event. If you are trying to iterate through a list of active touches, use activeTouches instead.
  13.         /// </summary>
  14.  
  15.         static public GetTouchDelegate GetTouch = delegate(int id, bool createIfMissing)
  16.         {
  17.                 if (id < 0) return GetMouse(-id - 1);
  18.  
  19.                 for (int i = 0, imax = mTouchIDs.Count; i < imax; ++i)
  20.                         if (mTouchIDs[i] == id) return activeTouches[i];
  21.  
  22.                 if (createIfMissing)
  23.                 {
  24.                         MouseOrTouch touch = new MouseOrTouch();
  25.                         touch.pressTime = RealTime.time;
  26.                         touch.touchBegan = true;
  27.                         activeTouches.Add(touch);
  28.                         mTouchIDs.Add(id);
  29.                         return touch;
  30.                 }
  31.                 return null;
  32.         };
  33.  
  34.         /// <summary>
  35.         /// Remove a touch event from the list.
  36.         /// </summary>
  37.  
  38.         static public RemoveTouchDelegate RemoveTouch = delegate(int id)
  39.         {
  40.                 for (int i = 0, imax = mTouchIDs.Count; i < imax; ++i)
  41.                 {
  42.                         if (mTouchIDs[i] == id)
  43.                         {
  44.                                 mTouchIDs.RemoveAt(i);
  45.                                 activeTouches.RemoveAt(i);
  46.                                 return;
  47.                         }
  48.                 }
  49.         };