Свойство | Тип | Описание | |
---|---|---|---|
NugetConfigFilePath | string | ||
PackOutputDirectory | string |
Метод | Описание | |
---|---|---|
DownloadImage ( string url ) : |
Downloads an image at the given URL and converts it to a Unity Texture2D.
|
|
GetInstalledPackages ( ) : List |
Gets the list of packages that are actually installed in the project.
|
|
GetUpdates ( List |
Queries the server with the given list of installed packages to get any updates that are available.
|
|
Install ( NugetPackage package, bool refreshAssets = true ) : void |
Installs the given package.
|
|
LoadNugetConfigFile ( ) : void |
Loads the NuGet.config file.
|
|
LogVerbose ( string format ) : void |
Outputs the given message to the log only if verbose mode is active. Otherwise it does nothing.
|
|
Pack ( string nuspecFilePath ) : void |
Calls "nuget.exe pack" to create a .nupkg file based on the given .nuspec file.
|
|
Push ( |
Calls "nuget.exe push" to push a .nupkf file to the the server location defined in the NuGet.config file. Note: This differs slightly from NuGet's Push command by automatically calling Pack if the .nupkg doesn't already exist.
|
|
Restore ( ) : void |
Restores all packages defined in packages.config.
|
|
Search ( string searchTerm = "", bool includeAllVersions = false, bool includePrerelease = false, int numberToGet = 15, int numberToSkip ) : List |
Gets a list of NuGetPackages via the HTTP Search() function defined by NuGet.Server and NuGet Gallery. This allows searching for partial IDs or even the empty string (the default) to list ALL packages. NOTE: See the functions and parameters defined here: https://www.nuget.org/api/v2/$metadata
|
|
Uninstall ( NugetPackageIdentifier package, bool refreshAssets = true ) : void |
"Uninstalls" the given package by simply deleting its folder.
|
|
Update ( NugetPackageIdentifier currentVersion, NugetPackage newVersion, bool refreshAssets = true ) : void |
Updates a package by uninstalling the currently installed version and installing the "new" version.
|
|
UpdateAll ( IEnumerable |
Installs all of the given updates, and uninstalls the corresponding package that is already installed.
|
Метод | Описание | |
---|---|---|
Clean ( NugetPackageIdentifier package ) : void |
Cleans up a package after it has been installed. Since we are in Unity, we can make certain assumptions on which files will NOT be used, so we can delete them.
|
|
CopyStream ( Stream input, Stream output ) : void |
Copies the contents of input to output. Doesn't close either stream.
|
|
DeleteAllFiles ( string directoryPath, string extension ) : void |
Deletes all files in the given directory or in any sub-directory, with the given extension.
|
|
DeleteDirectory ( string directoryPath ) : void |
Recursively deletes the folder at the given path. NOTE: Directory.Delete() doesn't delete Read-Only files, whereas this does.
|
|
DeleteFile ( string filePath ) : void |
Deletes a file at the given filepath.
|
|
FixSpaces ( string directoryPath ) : void |
Replace all %20 encodings with a normal space.
|
|
GetCachedPackage ( NugetPackageIdentifier packageId ) : NugetPackage |
Tries to find an already cached package that matches (or is in the range of) the given package ID.
|
|
GetInstalledPackage ( NugetPackageIdentifier packageId ) : NugetPackage |
Tries to find an already installed package that matches (or is in the range of) the given package ID.
|
|
GetOnlinePackage ( NugetPackageIdentifier packageId ) : NugetPackage |
Tries to find an "online" (in the package sources - which could be local) package that matches (or is in the range of) the given package ID.
|
|
GetSpecificPackage ( NugetPackageIdentifier packageId ) : NugetPackage |
Gets a NugetPackage from the NuGet server with the exact ID and Version given. If an exact match isn't found, it selects the next closest version available.
|
|
InstallIdentifier ( NugetPackageIdentifier package ) : void |
Installs the package given by the identifer. It fetches the appropriate full package from the installed packages, package cache, or package sources and installs it.
|
|
IsInstalled ( NugetPackageIdentifier package ) : bool |
Checks if a given package is installed.
|
|
NugetHelper ( ) : System |
Static constructor used by Unity to initialize NuGet and restore packages defined in packages.config.
|
|
RunNugetProcess ( string arguments, bool logOuput = true ) : void |
Runs nuget.exe using the given arguments.
|
public static DownloadImage ( string url ) : |
||
url | string | The URL of the image to download. |
Результат |
public static GetInstalledPackages ( ) : List |
||
Результат | List |
public static GetUpdates ( List |
||
packagesToUpdate | List |
The list of currently installed packages. |
includePrerelease | bool | True to include prerelease packages (alpha, beta, etc). |
includeAllVersions | bool | True to include older versions that are not the latest version. |
targetFrameworks | string | The specific frameworks to target? |
versionContraints | string | The version constraints? |
Результат | List |
public static Install ( NugetPackage package, bool refreshAssets = true ) : void | ||
package | NugetPackage | The package to install. |
refreshAssets | bool | True to refresh the Unity asset database. False to ignore the changes (temporarily). |
Результат | void |
public static LoadNugetConfigFile ( ) : void | ||
Результат | void |
public static LogVerbose ( string format ) : void | ||
format | string | The formatted message string. |
Результат | void |
public static Pack ( string nuspecFilePath ) : void | ||
nuspecFilePath | string | The full filepath to the .nuspec file to use. |
Результат | void |
public static Push ( |
||
nuspec | The NuspecFile which defines the package to push. Only the ID and Version are used. | |
nuspecFilePath | string | The full filepath to the .nuspec file to use. This is required by NuGet's Push command. |
apiKey | string | The API key to use when pushing a package to the server. This is optional. |
Результат | void |
public static Search ( string searchTerm = "", bool includeAllVersions = false, bool includePrerelease = false, int numberToGet = 15, int numberToSkip ) : List |
||
searchTerm | string | The search term to use to filter packages. Defaults to the empty string. |
includeAllVersions | bool | True to include older versions that are not the latest version. |
includePrerelease | bool | True to include prerelease packages (alpha, beta, etc). |
numberToGet | int | The number of packages to fetch. |
numberToSkip | int | The number of packages to skip before fetching. |
Результат | List |
public static Uninstall ( NugetPackageIdentifier package, bool refreshAssets = true ) : void | ||
package | NugetPackageIdentifier | The NugetPackage to uninstall. |
refreshAssets | bool | True to force Unity to refesh its Assets folder. False to temporarily ignore the change. Defaults to true. |
Результат | void |
public static Update ( NugetPackageIdentifier currentVersion, NugetPackage newVersion, bool refreshAssets = true ) : void | ||
currentVersion | NugetPackageIdentifier | The current package to uninstall. |
newVersion | NugetPackage | The package to install. |
refreshAssets | bool | True to refresh the assets inside Unity. False to ignore them (for now). Defaults to true. |
Результат | void |
public static UpdateAll ( IEnumerable |
||
updates | IEnumerable |
The list of all updates to install. |
packagesToUpdate | List |
The list of all packages currently installed. |
Результат | void |
public static string NugetConfigFilePath | ||
Результат | string |