Skip to content

Commit

Permalink
Toon EV adjustment help URL (#168)
Browse files Browse the repository at this point in the history
* Fixed:
* Dead links for Toon EV adjutment HELP URL Buttons.
* Some classes are accessible from outside.

* Fixed: typo in CHANGELOG.md [skip ci]
  • Loading branch information
H3idi-X authored May 30, 2022
1 parent 36d0ae9 commit 8b82203
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
7 changes: 4 additions & 3 deletions com.unity.toonshader/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Changelog
## [0.7.2-preview] - 2022-05-27
### Updated:
* Next Version is 0.7.2-preview
## [0.7.2-preview] - 2022-05-30
### Fixed:
* Dead links for Toon EV adjustment HELP URL Buttons.
* Some classes are accessible from outside.

## [0.7.1-preview] - 2022-05-26
### Updated:
Expand Down
16 changes: 8 additions & 8 deletions com.unity.toonshader/Editor/MeterialEditor/UTS3Documentation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ namespace UnityEditor.Rendering.Toon
/// </example>
[Conditional("UNITY_EDITOR")]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Enum, AllowMultiple = false)]
public class UTS3HelpURLAttribute : HelpURLAttribute
internal class UTS3HelpURLAttribute : HelpURLAttribute
{
/// <summary>
/// The constructor of the attribute
/// </summary>
/// <param name="pageName"></param>
/// <param name="packageName"></param>
public UTS3HelpURLAttribute(string pageName, string packageName = "com.unity.toonshader")
internal UTS3HelpURLAttribute(string pageName, string packageName = "com.unity.toonshader")
: base(UTS3DocumentationInfo.GetPageLink(packageName, pageName))
{
}
Expand All @@ -40,9 +40,9 @@ public UTS3HelpURLAttribute(string pageName, string packageName = "com.unity.too
/// <summary>
/// Documentation Info class.
/// </summary>
public class UTS3DocumentationInfo
internal class UTS3DocumentationInfo
{
const string fallbackVersion = "0.7";
internal const string fallbackVersion = "0.7";
#if USE_GITHUB_DOC_LINK
const string fallbackVersion = "";
const string url = "https://github.com/Unity-Technologies/{0}/blob/development/v1/{0}/Documentation~/";
Expand All @@ -55,7 +55,7 @@ public class UTS3DocumentationInfo
/// <summary>
/// Current version of the documentation.
/// </summary>
public static string version
internal static string version
{
get
{
Expand All @@ -69,21 +69,21 @@ public static string version
/// <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);
internal static string GetPageLink(string packageName, string pageName) => string.Format(url, packageName, version, pageName);
}

/// <summary>
/// Set of utils for documentation
/// </summary>
public static class UTS3DocumentationUtils
internal static class UTS3DocumentationUtils
{
/// <summary>
/// Obtains the help url from an enum
/// </summary>
/// <typeparam name="TEnum">The enum with a <see cref="HelpURLAttribute"/></typeparam>
/// <param name="mask">[Optional] The current value of the enum</param>
/// <returns>The full url</returns>
public static string GetHelpURL<TEnum>(TEnum mask = default)
internal static string GetHelpURL<TEnum>(TEnum mask = default)
where TEnum : struct, IConvertible
{
var type = mask.GetType();
Expand Down
1 change: 1 addition & 0 deletions com.unity.toonshader/Runtime/ModelToonEvAdjustment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Unity.Rendering.Toon
{
[HelpURL("https://docs.unity3d.com/Packages/com.unity.toonshader@0.7/manual/ToonEVAdjustment.html")]
[ExecuteAlways]
[DisallowMultipleComponent]
internal class ModelToonEvAdjustment : MonoBehaviour
Expand Down
3 changes: 3 additions & 0 deletions com.unity.toonshader/Runtime/SceneToonEvAdjustment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@
using UnityObject = UnityEngine.Object;
namespace Unity.Rendering.Toon
{


[ExecuteAlways]
[DisallowMultipleComponent]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.toonshader@0.7/manual/ToonEVAdjustment.html")]
internal class SceneToonEvAdjustment : MonoBehaviour
{
// flags
Expand Down

0 comments on commit 8b82203

Please sign in to comment.