Author Topic: Asset Store Support  (Read 5653 times)

Chris_E

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 37
    • View Profile
Asset Store Support
« on: February 06, 2014, 11:40:00 PM »
Hi,

I'm making an asset, and wanted to include a demo script that shows off how easy it is to integrate with nGUI.  My problem is, if the user doesn't have nGUI the demo script will give them a bunch of errors such as:

Assets/MissionGUI.cs(148,58): error CS0246: The type or namespace name `UILabel' could not be found. Are you missing a using directive or an assembly reference?

Is there any way around this?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Asset Store Support
« Reply #1 on: February 08, 2014, 01:43:05 PM »
What I do myself is include more than one version inside the asset store package. I first create a version that doesn't require NGUI, then add NGUI code to it. I then export the changed files as a separate package, and then revert everything. This way the user can start by having a non-NGUI version, then if they have NGUI -- import the other package.

Chris_E

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 37
    • View Profile
Re: Asset Store Support
« Reply #2 on: April 09, 2014, 08:55:45 PM »
Would you consider putting in a #define in for nGUI in the next version?  That way 3rd party developers could just throw in "#if nGUI" and make things a lot easier/cleaner.

Edit:  I've temporarily done this myself by adding in a smcs.rsp file with instructions to delete it if the user isn't using nGUI.  I may add an additional file that runs in the editor and searches for the nGUI folder, and does a Debug.LogError telling them to delete the smcs.rsp file if they aren't using nGUI.
« Last Edit: April 09, 2014, 11:23:02 PM by Chris_E »