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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

GUI.Box with Border but no Background

Discussion in 'General Graphics' started by OxOGau, Feb 26, 2015.

  1. OxOGau

    OxOGau

    Joined:
    Nov 3, 2014
    Posts:
    4
    Hello,

    I want to create a Box with Border but no Background. All I found in different Thread is about no Bordered Box.
    I try with GUI.Skin an Style but .. it was not good..

    Can anyone help me ?

    BR

    Gauthier
     
  2. bear_love_honey

    bear_love_honey

    Joined:
    Jan 7, 2015
    Posts:
    31
    Did you try put your image with alpha channel ?



    Code (CSharp):
    1. GUI.Box(new Rect(200, 200, 300, 300), "Test", skin.box);
    Create your
    Code (CSharp):
    1. public GUISkin skin;
    In Unity import your image with alpha channel, Box > Normal > Background
     
    Last edited: Feb 26, 2015
  3. OxOGau

    OxOGau

    Joined:
    Nov 3, 2014
    Posts:
    4
    Hi bear_love_honey,

    Thank you so much !

    I just tried to do that and it works perfectly !!

    Thank you !

    BR