Class DocumentationUtils
Set of utils for documentation
Inherited Members
Namespace: UnityEngine .Rendering
Assembly: Unity.RenderPipelines.Core.Runtime.dll
Syntax
public static class DocumentationUtils
Methods
GetHelpURL<TEnum>(TEnum)
Obtains the help url from an enum
Declaration
public static string GetHelpURL<TEnum>(TEnum mask = default) where TEnum : struct, IConvertible
Parameters
Type | Name | Description |
---|---|---|
TEnum | mask | [Optional] The current value of the enum |
Returns
Type | Description |
---|---|
string | The full url |
Type Parameters
Name | Description |
---|---|
TEnum | The enum with a Help |
TryGetDefaultHelpURL(Type, out string)
Obtains a help URL to the index page for the package documentation of a specified type.
Declaration
public static bool TryGetDefaultHelpURL(Type type, out string url)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type used to retrieve package information. |
string | url | The generated help URL to the package's index documentation page. |
Returns
Type | Description |
---|---|
bool | Returns true if a valid help URL is retrieved; otherwise, false. |
TryGetHelpURL(Type, out string)
Obtains the help URL from a type.
Declaration
public static bool TryGetHelpURL(Type type, out string url)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type decorated with the HelpURL attribute. |
string | url | The full URL from the HelpURL attribute. If the attribute is not present, this value is null. |
Returns
Type | Description |
---|---|
bool | Returns true if the attribute is present, and false otherwise. |
TryGetPackageInfoForType(Type, out string, out string)
Obtains package information for a specified type.
Declaration
public static bool TryGetPackageInfoForType(Type type, out string packageName, out string version)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type used to retrieve package information. |
string | packageName | The name of the package containing the given type. |
string | version | The version number of the package containing the given type. Only Major.Minor will be returned as fix is not used for documentation. |
Returns
Type | Description |
---|---|
bool | Returns true if the package information is found; otherwise, false. |