Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started 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?
-
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.
-
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.