Skip to content

Commit 515084e

Browse files
authored
Replaced url for link buttons. (#163)
1 parent b2fd053 commit 515084e

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

com.unity.toonshader/Editor/MeterialEditor/UTS3Documentation.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#define USE_GITHUB_DOC_LINK
1+
//#define USE_GITHUB_DOC_LINK
2+
#define USE_UTS_DOC_LINK
23
using System;
34
using System.Runtime.CompilerServices;
45
using System.Diagnostics;
@@ -41,12 +42,14 @@ public UTS3HelpURLAttribute(string pageName, string packageName = "com.unity.too
4142
/// </summary>
4243
public class UTS3DocumentationInfo
4344
{
45+
const string fallbackVersion = "0.7";
4446
#if USE_GITHUB_DOC_LINK
4547
const string fallbackVersion = "";
4648
const string url = "https://github.com/Unity-Technologies/{0}/blob/development/v1/{0}/Documentation~/";
47-
// const string url = "https://github.com/Unity-Technologies/{0}/blob/task/1283-2-doc/{0}/Documentation~/";
49+
#elif USE_UTS_DOC_LINK
50+
const string url = "https://docs.unity3d.com/Packages/{0}@{1}/manual/";
4851
#else
49-
const string fallbackVersion = "0.7";
52+
5053
const string url = "https://docs.unity3d.com/Packages/{0}@{1}/manual/{2}.html";
5154
#endif
5255
/// <summary>
@@ -93,7 +96,11 @@ public static string GetHelpURL<TEnum>(TEnum mask = default)
9396
.FirstOrDefault();
9497
#if USE_GITHUB_DOC_LINK
9598
return helpURLAttribute == null ? string.Empty : $"{helpURLAttribute.URL}{mask}.md";
99+
100+
#elif USE_UTS_DOC_LINK
101+
return helpURLAttribute == null ? string.Empty : $"{helpURLAttribute.URL}{mask}.html";
96102
#else
103+
97104
return helpURLAttribute == null ? string.Empty : $"{helpURLAttribute.URL}#{mask}";
98105
#endif
99106
}

0 commit comments

Comments
 (0)