Skip to content

Commit

Permalink
Fix breaking API changes (#6713)
Browse files Browse the repository at this point in the history
  • Loading branch information
pbbastian authored Jan 12, 2022
1 parent 4af9477 commit 0b146b1
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions com.unity.render-pipelines.core/Runtime/Documentation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,23 @@ namespace UnityEngine.Rendering
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Enum, AllowMultiple = false)]
public class CoreRPHelpURLAttribute : HelpURLAttribute
{
/// <summary>
/// The constructor of the attribute
/// </summary>
/// <param name="pageName"></param>
/// <param name="packageName"></param>
public CoreRPHelpURLAttribute(string pageName, string packageName = "com.unity.render-pipelines.core")
: base(DocumentationInfo.GetPageLink(packageName, pageName, ""))
{
}

/// <summary>
/// The constructor of the attribute
/// </summary>
/// <param name="pageName"></param>
/// <param name="packageName"></param>
/// <param name="pageHash"></param>
public CoreRPHelpURLAttribute(string pageName, string packageName = "com.unity.render-pipelines.core", string pageHash = "")
public CoreRPHelpURLAttribute(string pageName, string pageHash, string packageName = "com.unity.render-pipelines.core")
: base(DocumentationInfo.GetPageLink(packageName, pageName, pageHash))
{
}
Expand Down Expand Up @@ -59,14 +69,22 @@ public static string version
}
}

/// <summary>
/// Generates a help url for the given package and page name
/// </summary>
/// <param name="packageName">The package name</param>
/// <param name="pageName">The page name</param>
/// <returns>The full url page</returns>
public static string GetPageLink(string packageName, string pageName) => string.Format(url, packageName, version, pageName, "");

/// <summary>
/// Generates a help url for the given package and page name
/// </summary>
/// <param name="packageName">The package name</param>
/// <param name="pageName">The page name</param>
/// <param name="pageHash">The page hash</param>
/// <returns>The full url page</returns>
public static string GetPageLink(string packageName, string pageName, string pageHash = "") => string.Format(url, packageName, version, pageName, pageHash);
public static string GetPageLink(string packageName, string pageName, string pageHash) => string.Format(url, packageName, version, pageName, pageHash);
}

/// <summary>
Expand Down

0 comments on commit 0b146b1

Please sign in to comment.