本文整理汇总了C#中UnityEngine.GetHelpUrl方法的典型用法代码示例。如果您正苦于以下问题:C# UnityEngine.GetHelpUrl方法的具体用法?C# UnityEngine.GetHelpUrl怎么用?C# UnityEngine.GetHelpUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UnityEngine
的用法示例。
在下文中一共展示了UnityEngine.GetHelpUrl方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ObjectTitlebar
public static bool ObjectTitlebar(UnityEngine.Object targetObject, bool foldout ,ref bool enabled, GenericMenu settings){
int controlID = EditorGUIUtility.GetControlID (FocusType.Passive);
GUIContent content = new GUIContent (targetObject.name.Replace("/","."), targetObject.GetTooltip());
Rect position= GUILayoutUtility.GetRect(GUIContent.none, FsmEditorStyles.inspectorTitle);
Rect rect = new Rect(position.x + (float)FsmEditorStyles.inspectorTitle.padding.left, position.y + (float)FsmEditorStyles.inspectorTitle.padding.top, 16f, 16f);
Rect rect1 = new Rect(position.xMax - (float)FsmEditorStyles.inspectorTitle.padding.right - 2f - 16f, rect.y, 16f, 16f);
Rect rect4 = rect1;
rect4.x = rect4.x - 18f;
Rect rect2 = new Rect(position.x + 2f + 2f + 16f*2, rect.y, 100f, rect.height)
{
xMax = rect4.xMin - 2f
};
Rect rect3 = new Rect(position.x + 16f, rect.y, 16f, 16f);
enabled=GUI.Toggle (rect3, enabled,GUIContent.none);
string url=targetObject.GetHelpUrl();
if (ErrorChecker.HasErrors (targetObject)) {
Rect rect5 = rect4;
rect5.y += 1.0f;
if(!string.IsNullOrEmpty(url)){
rect5.x = rect5.x - 18f;
rect2.xMax=rect5.x;
}
GUI.Label (rect5, FsmEditorStyles.errorIcon, FsmEditorStyles.inspectorTitleText);
}
if (GUI.Button(rect1, FsmEditorStyles.popupIcon,FsmEditorStyles.inspectorTitleText))
{
settings.ShowAsContext();
}
if (!string.IsNullOrEmpty(url) && GUI.Button(rect4, FsmEditorStyles.helpIcon,FsmEditorStyles.inspectorTitleText))
{
Application.OpenURL(url);
}
EventType eventType = Event.current.type;
if (eventType != EventType.MouseDown) {
if (eventType == EventType.Repaint)
{
FsmEditorStyles.inspectorTitle.Draw (position, GUIContent.none, controlID, foldout);
Color color = GUI.contentColor;
if (FsmEditor.Active != null && FsmEditor.Active.Owner != null) {
ICodeBehaviour behaviour=FsmEditor.Active.Owner;
if(behaviour.ActiveNode is State && (behaviour.ActiveNode as State).ActiveAction==targetObject){
GUI.contentColor = Color.green;
}
}
FsmEditorStyles.inspectorTitleText.Draw (rect2, content, controlID, foldout);
GUI.contentColor = color;
}
}
position.width = 15;
bool flag = FsmGUIUtility.DoToggleForward(position,controlID, foldout,GUIContent.none,GUIStyle.none);
return flag;
}