Help.BrowseURL 浏览网址

static function BrowseURL (url : string) : void

Description描述

Open url in the default web browser.

在默认web浏览器中打开url

Help.BrowseURL 浏览网页

Editor Window that lets you load docs for any Selected GameObject.

// EditorScript that quickly searchs for a help page
// of the selected Object.
//编辑器脚本快速搜索选择物体的帮助页面
// If there is no page found on the Manual it opens the Unity forum.
//如果手册中没有发现页面,将打开Unity论坛
import UnityEditor;

class QuickHelper extends EditorWindow {

	var source : Object;

	@MenuItem("Example/QuickHelper _h")
	static function Init() {
		var window : QuickHelper = EditorWindow.GetWindowWithRect(QuickHelper, Rect(0,0,165,100));
		window.Show();
	}

	function OnGUI() {
		EditorGUILayout.BeginHorizontal();
		source = EditorGUILayout.ObjectField(source, Object);
		EditorGUILayout.EndHorizontal();

		if(GUILayout.Button("Search!")) {
			if(source == null) {
			this.ShowNotification(GUIContent("No object selected for searching"));
			} else {
				if(Help.HasHelpForObject(source))
					Help.ShowHelpForObject(source);
				else
					Help.BrowseURL("http://forum.unity3d.com/search.php");
			}
		}
	}
}
Page last updated: 2011-6-15