Author Topic: NGUI as DLLs  (Read 6277 times)

FWCorey

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 13
    • View Profile
NGUI as DLLs
« on: February 12, 2013, 07:02:14 PM »
It would be nice and make for easier upgrading if NGUI was also released as a pair of DLLs (One for \Plugins and one for \Editor) I've done this myself and it works just fine. As for people who are modifying the original NGUI scripts that can still be done in most cases by creating new classes that derive from the originals and override or add functions and events as necessary. This would also provide a way of having a project with a full featured re-distributable version of NGUI that is functionally identical but doesn't include any sourcecode.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI as DLLs
« Reply #1 on: February 13, 2013, 01:54:40 PM »
NGUI has platform-specific code inside (for example UIInput) which won't work if I compiled it as a DLL.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: NGUI as DLLs
« Reply #2 on: February 13, 2013, 03:04:49 PM »
We've had too much trouble with plugins as dlls, where we have had to wait for whichever plugin developers to get their act together and fix their shit. If NGUI changed to being compiled into dll's we would not use it anymore.

FWCorey

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 13
    • View Profile
Re: NGUI as DLLs
« Reply #3 on: February 13, 2013, 05:53:33 PM »
We've had too much trouble with plugins as dlls, where we have had to wait for whichever plugin developers to get their act together and fix their shit. If NGUI changed to being compiled into dll's we would not use it anymore.
Not suggesting changing it, just including precompiled as well for convenience and allowing the compiled DLLs to be used as a re-distributable. The former being the cherry on a sundae since it has to be compiled twice to produce a set for 3.x and set for 4.x of Unity. The latter meaning the re-distributable has all of the power of the full package for scripts that rely on it as well as allowing external DLLs to reference it as a dependency.

FWCorey

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 13
    • View Profile
Re: NGUI as DLLs
« Reply #4 on: February 13, 2013, 05:59:31 PM »
NGUI has platform-specific code inside (for example UIInput) which won't work if I compiled it as a DLL.
You can set the debug switches in the compiler options. just have to make sure for each compile it references the correct versions of UnityEngine.dll and UnityEditor.dll as well before compiling. As I said I've done it myself and it worked fine. I couldn't use them in my current project because it breaks the meta-data connections in the existing scenes and prefabs and it would be too tedious to set them all up again, but I definitely will in my next project because of the massive advantages in a 2-man 1 programmer team of simply updating DLLs instead of syncing the project folder. I don't even need to run Unity. Just have the artist download the latest DLLs from the git repository which saves us a licensing seat for Unity since only one person has to run it.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI as DLLs
« Reply #5 on: February 13, 2013, 10:25:47 PM »
Either way you go, there would have to be many different DLLs. One for flash. One for Android/iOS. One for web player, etc. Then of course Unity 3 vs Unity 4, so multiply that by two.

Bottom line: this isn't going to happen.

FWCorey

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 13
    • View Profile
Re: NGUI as DLLs
« Reply #6 on: February 14, 2013, 07:18:22 AM »
Ahhh. Didn't realize there were a lot of platform switches in as well. I've only been working with Android and haven't had to delve too deeply into the source. That's understandable then. Thanks for your time Aren. Go ahead and close the topic.