public override void OnInspectorGUI() { GUI.enabled = true; if (_isDocViewable && GUILayout.Button("Open Doc Viewer")) { DocViewerWindow.Load("file:///" + _fullPath); } _defaultEditor.OnInspectorGUI(); }
static public DocViewerWindow Load(string url) { InitFieldMapping(); DocViewerWindow window = DocViewerWindow.GetWindow <DocViewerWindow>(); window.urlText = url; window.Init(); window.ShowUtility(); return(window); }
public void OnGUI() { mScrollPos = GUILayout.BeginScrollView(mScrollPos, false, true, GUILayout.Width(580), GUILayout.Height(300)); mDocPaths.ForEach(item => { var docPath = item.Replace("\\", "/"); var docName = docPath.Replace(mPackagePath, string.Empty); if (GUILayout.Button(docName)) { // DocViewerWindow.Load("file:///" + docPath); DocViewerWindow.Load( "https://www.notion.so/qframework/QFramework-e5a4846c79de459da0407859000bac24"); } }); GUILayout.EndScrollView(); }
public void OnGUI() { mScrollPos = GUILayout.BeginScrollView(mScrollPos, false, true, GUILayout.Width(580), GUILayout.Height(300)); mDocPaths.ForEach(item => { var docPath = item.Replace("\\", "/"); var docName = docPath.Replace(mPackagePath, string.Empty); if (GUILayout.Button(docName)) { DocViewerWindow.Load("file:///" + docPath); // DocViewerWindow.Load( // "https://www.notion.so/qframework/QFramework-e5a4846c79de459da0407859000bac24"); // DocViewerWindow.Load("https://mp.weixin.qq.com/s/qzmztWaemixdvzY1G0gxdw"); // DocViewerWindow.Load("https://mp.weixin.qq.com/s/yIaQLffk-te03IGtaDqEiQ"); } }); GUILayout.EndScrollView(); }