Search Unity

Unable to find style " in 'lightskin' | Custom Editor Programming

Discussion in 'Scripting' started by Sykoo, Apr 18, 2015.

  1. Sykoo

    Sykoo

    Joined:
    Jul 25, 2014
    Posts:
    1,394
    Hello!
    I am making my own editor extension and I got this bug which makes the whole engine slow the heck down, and literally lag its ass off!



    I got no idea how to fix it, nor did I find anything at the Internet nor on the forums!
    Please help me out on this one :/

    PS: It points at parts where I write such as:
    ...
    GUILayout.BeginHorizontal("");
    ...
     
  2. hpjohn

    hpjohn

    Joined:
    Aug 14, 2012
    Posts:
    2,190
    when you have BeginHorizontal("someString") it tries to use the style called "someString"
    You are passing an empty string, so it's trying to find a style called "" (which doesnt exist)
    you can use an overload with no paramaters
     
  3. Sykoo

    Sykoo

    Joined:
    Jul 25, 2014
    Posts:
    1,394
    You saved me from so much trouble!
    I thought that when I wrote only (); without any parameters, it was giving an error but I think it was something else that gave the error then. Thank you so much! :D
     
    SamFernGamer4k likes this.