public static GUIContent[] GetGUIContents(NoLabelIcon noLabelIcon) { var methodInfo = GetMethodInfo_IconContent(); object[] parameters = new object[] { "sv_icon_dot" + noLabelIcon.ToString() + "_pix16_gizmo" }; int length = (int)LabelIcon.Length; GUIContent[] contents = new GUIContent[length]; for (int i = 0; i < length; i++) { contents[i] = methodInfo.Invoke(null, parameters) as GUIContent; } return(contents); }
/// <summary> /// 设置游戏对象的 Selection Icon /// </summary> /// <param name="gameObject"></param> /// <param name="labelIcon">Selection Icon 类型:不带文件</param> public static void SetSelectionIcon(UnityEngine.Object obj, NoLabelIcon noLabelIcon) { SetSelectionIcon(obj, GetGUIContent(noLabelIcon).image as Texture2D); }
public static GUIContent GetGUIContent(NoLabelIcon noLabelIcon) { var methodInfo = GetMethodInfo_IconContent(); return(methodInfo.Invoke(null, new object[] { "sv_icon_dot" + noLabelIcon.ToString() + "_pix16_gizmo" }) as GUIContent); }