Author Topic: NGUI and OUYA  (Read 4616 times)

tgraupmann

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 15
    • View Profile
NGUI and OUYA
« on: January 20, 2013, 07:29:25 PM »
Hello awesome NGUI Unity Guru. This is Tim, I made another awesome plugin labelled the "OUYA Unity Package".

In this package I use the distributed NGUI package (slightly dusted). Where there are some issues when they upgrade to 4.X or if they already have NGUI installed.

Is it possible for you to tweak NGUI PRO and NGUI Distributed so they could like and play nice together in the same project?

I made the OUYA examples to use NGUI for some UI elements, so during import of the examples the NGUI references clobber NGUI PRO.

Anyway I'm sure you can figure it out. I'd really appreciate being to have both distributed and PRO to live together. With distributed you just get the runtimes. And with PRO, the editor functionality would appear.

There are tons of Unity free and Unity PRO folks out there. Just trying to make an environment where they can play nice together.

If you want to see progress check the video thread:
http://forums.ouya.tv/discussion/200/sticky-ouya-unity-package-videos/p1

Thanks again for your awesome plugin,

~Tim

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI and OUYA
« Reply #1 on: January 20, 2013, 07:33:20 PM »
I saw that thread earlier this morning actually. Unfortunately the upgrade issues are with Unity rather than NGUI. The easiest thing to do is to compartmentalize the examples into several unitypackages -- ones with NGUI and ones without. You can then also include the NGUI distribution version which those that already have NGUI can simply not import.

That said, I will be updating the Free and Distribution versions in the near future, likely to version 2.2.8.

tgraupmann

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 15
    • View Profile
Re: NGUI and OUYA
« Reply #2 on: January 22, 2013, 05:13:42 PM »
Mainly it's the active/enabled changes in 4.X.

Would it be possible to add platform checks around those?

#if UNITY_3_5

// use active

#else if UNITY_4_0

// do the new way

#endif

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI and OUYA
« Reply #3 on: January 22, 2013, 09:08:31 PM »
#ifs won't work inside a DLL which NGUI free comes in. The DLL is only compiled with one set of #ifdefs.

tgraupmann

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 15
    • View Profile
Re: NGUI and OUYA
« Reply #4 on: January 22, 2013, 09:16:36 PM »
gotcha

tgraupmann

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 15
    • View Profile
Re: NGUI and OUYA
« Reply #5 on: January 22, 2013, 11:12:01 PM »
Potentially we could put both DLLs into a zip archive included in the package, and have a menu item that extracts from a password protected zip. The menu item that extracts from the zip could extract the right DLL based on the Unity version.

And then the menu item would clean up the wrong version.