@@ -38,7 +38,8 @@ class ConfigEditor : EditorWindow
3838 {
3939 #region Constants
4040 private const string BLUEMIX_REGISTRATION = "https://console.ng.bluemix.net/registration/" ;
41- private const string API_REFERENCE = "/Watson/Editor/Help/WatsonUnitySDK.chm" ;
41+ private const string API_REFERENCE = "WatsonUnitySDK.chm" ;
42+ private const string README = "https://github.com/watson-developer-cloud/unity-sdk/blob/develop/readme.md" ;
4243
4344 private class ServiceSetup
4445 {
@@ -143,11 +144,31 @@ private static void SaveConfig()
143144 File . WriteAllText ( Application . streamingAssetsPath + "/Config.json" , Config . Instance . SaveConfig ( ) ) ;
144145 }
145146
147+ private static string FindFile ( string directory , string name )
148+ {
149+ foreach ( var f in Directory . GetFiles ( directory ) )
150+ if ( f . EndsWith ( name ) )
151+ return f ;
152+
153+ foreach ( var d in Directory . GetDirectories ( directory ) )
154+ {
155+ string found = FindFile ( d , name ) ;
156+ if ( found != null )
157+ return found ;
158+ }
159+
160+ return null ;
161+ }
162+
146163 [ MenuItem ( "Watson/API Reference" , false , 100 ) ]
147- private static void ShowHelp ( )
164+ private static void ShowAPIReference ( )
165+ {
166+ Application . OpenURL ( "file://" + FindFile ( Application . dataPath , API_REFERENCE ) ) ;
167+ }
168+ [ MenuItem ( "Watson/Getting Started" , false , 100 ) ]
169+ private static void ShowReadme ( )
148170 {
149- string helpFile = "file://" + Application . dataPath + API_REFERENCE ;
150- Application . OpenURL ( helpFile ) ;
171+ Application . OpenURL ( README ) ;
151172 }
152173
153174 [ MenuItem ( "Watson/Configuration Editor" , false , 0 ) ]
0 commit comments