unity3d ~黑科技~ 绘制一个原生风格的搜索框
文章目录

public static string SearchField(string value, params GUILayoutOption[] options)
{
MethodInfo info = typeof(EditorGUILayout).GetMethod("ToolbarSearchField", BindingFlags.NonPublic | BindingFlags.Static, null, new System.Type[] { typeof(string), typeof(GUILayoutOption[]) }, null);
if (info != null)
{
value = (string)info.Invoke(null, new object[] { value, options });
}
return value;
}

评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论