Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

custom editorWindow GUISkin

Discussion in 'UGUI & TextMesh Pro' started by Homicide, Mar 4, 2018.

  1. Homicide

    Homicide

    Joined:
    Oct 11, 2012
    Posts:
    637
    hi guys. I created a custom GUIStyle, but when i applied it, the borders on all my gui elements disappeared. So now, i am trying to create a GUISkin to apply to my custom EditorWindow

    I have tried applying border.left right, etc settings.

    I cant seem to makea border appear again.in GUIStyle or GUISkin Could someone give me an example, as i scoured the reference article but really couldn't make sense of it as they don't show many GUI options at work beyond simply drawing it on screen at default.

    I should mention that this is for use with a custom editor window, so im sure that may have something to do with my issues.

    ty
     
    Last edited: Mar 4, 2018
  2. Homicide

    Homicide

    Joined:
    Oct 11, 2012
    Posts:
    637
    I have tried creating a custom GUISkin and applying it in my custom editor window, but it doesnt seem to work. Well, it does and doesnt.

    Code (CSharp):
    1.  
    2.     void OnEnable()
    3.     {
    4.         guiskin = Resources.Load<GUISkin>("EditorSkin");
    Code (CSharp):
    1.     private void OnGUI()
    2.     {
    3.         GUI.skin = guiskin;
    I can see some things like selection color change in an integer field when i hilite it, but when i try setting label font to bold or anything like borders, it does nothing. In fact i think the only thing it is doing is changing a few values under the general settings.

    Any tips?
     
    Last edited: Mar 4, 2018
  3. Homicide

    Homicide

    Joined:
    Oct 11, 2012
    Posts:
    637
    Updated : I have gotten the GUISkin to work, but now i have an issue where i am using GUIEditor IntFields, and it seems theres nothing to control those appearances via GUISkin. TextFields arent the same.

    Still hopin for a little tip or two here.
     
    T-Zee likes this.
  4. KimberleyC

    KimberleyC

    Joined:
    Mar 22, 2021
    Posts:
    20
    Hi, may I know how you got it to work? I can't seem to figure it out.