Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Chris_E on February 06, 2014, 11:40:00 PM

Title: Asset Store Support
Post by: Chris_E 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?
Title: Re: Asset Store Support
Post by: ArenMook 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.
Title: Re: Asset Store Support
Post by: Chris_E 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.