Assets/Watson/Scripts/Editor/Build.cs
/// <summary>
/// Get the build path for the specified target.
/// </summary>
/// <param name="target">The BuildTarget.</param>
/// <returns>The full path to the build.</returns>
Get the build path for the specified target.
Get the build path for the specified target .
public static string GetBuildPath(BuildTarget target, bool bCleanTarget = false)
    {
        string projectName = Path.GetFileNameWithoutExtension(Application.productName);
        if (target == BuildTarget.StandaloneWindows || target == BuildTarget.StandaloneWindows64)
            projectName += ".exe";
        else if (target == BuildTarget.StandaloneOSXIntel || target == BuildTarget.StandaloneOSXIntel64 || target == BuildTarget.StandaloneOSXUniversal)
            projectName += ".app";
        else if (target == BuildTarget.Android)
            projectName += ".apk";
        else if (target == BuildTarget.iOS)
            projectName += ".ipa";
        string directory = Application.dataPath + "/../Clients/" + target.ToString();
        if (bCleanTarget && Directory.Exists(directory))
            Directory.Delete(directory, true);
        Directory.CreateDirectory(directory);
        return directory + "/" + projectName;
    }
public static string GetBuildPath ( BuildTarget target , bool bCleanTarget = false ) { string projectName = Path . GetFileNameWithoutExtension ( Application . productName ) ; if ( target == BuildTarget . StandaloneWindows || target == BuildTarget . StandaloneWindows64 ) projectName += " " ; else if ( target == BuildTarget . StandaloneOSXIntel || target == BuildTarget . StandaloneOSXIntel64 || target == BuildTarget . StandaloneOSXUniversal ) projectName += " " ; else if ( target == BuildTarget . Android ) projectName += " " ; else if ( target == BuildTarget . iOS ) projectName += " " ; string directory = Application . dataPath + " " + target . ToString ( ) ; if ( bCleanTarget && Directory . Exists ( directory ) ) Directory . Delete ( directory , true ) ; Directory . CreateDirectory ( directory ) ; return directory + " " + projectName ; }
Get the build path for the specified target.
Get the build path for the specified target .
The full path to the build.
The full path to the build .
target
BuildTarget
None
bCleanTarget
bool