Skip to content

ToolbarSearchStyle is broken in newer unity versions #5

Description

@Ants-Aare

I tried using the tool in a newer unity version and the create role menu doesn't work. It's complaining because it doesn't find the correct UI style. and therefore errors out and just draws an empty selector. this is because there's a typo in the GUI style in specific unity versions.
I've come across this same error multiple times and it's fixed by doing this:

public static GUIStyle ToolbarSearchTextField = GUI.skin.FindStyle("ToolbarSeachTextField") ?? GUI.skin.FindStyle("ToolbarSearchTextField");
public static GUIStyle ToolbarSearchCancelButtonStyle = GUI.skin.FindStyle("ToolbarSeachCancelButton") ?? GUI.skin.FindStyle("ToolbarSearchCancelButton");

(also caching these inside a static variable makes sense, otherwise it's gonna call FindStyle too many times)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions