Search Unity

Remove canvas outline

Discussion in 'UGUI & TextMesh Pro' started by Scorpion2k, Dec 3, 2014.

  1. Scorpion2k

    Scorpion2k

    Joined:
    Dec 3, 2014
    Posts:
    3
    As the title say i need to remove the white canvas outline, via code i can easily remove the elements inside my canvas(in my case 2 buttons) but i can't even remove the outline.
    I'm quite new to unity and i think that is quite easy to do but i have not found any solution yet.
    Thanks in advance

    ps. Sorry for my bad english ^^
     
  2. phil-Unity

    phil-Unity

    Unity UI Lead Developer

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    why do you need to remove the outline? its only drawn in the scene view so will not show in game.
     
  3. Scorpion2k

    Scorpion2k

    Joined:
    Dec 3, 2014
    Posts:
    3
    Ok didn't know that .... now i'm playing my game in the game window of the unity environment and in this window i can still see the outline. For some problems i can't build my project now, so i can't verify if in the real game i can see the outline :/.
    But the game window of the environment shouldn't be equal to the real game?

    (Yes as you can see i'm totally new to this)

    Thanks for your reply
     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Turn off gizmos in the game view.

    --Eric
     
  5. phil-Unity

    phil-Unity

    Unity UI Lead Developer

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    It shouldn't be drawn in the game view at all... it doesnt draw for me in the game view. Are you sure you're not looking at the scene view?
     
  6. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    The game view definitely draws the canvas edge, and there's specifically a toggle for "canvas" in the gizmo list (so you can turn that off without affecting other gizmos), so it sounds intentional to me.

    --Eric
     
    Davetronix likes this.
  7. Scorpion2k

    Scorpion2k

    Joined:
    Dec 3, 2014
    Posts:
    3
    Yeah i notice that after other attempts, thank you !
     
  8. phil-Unity

    phil-Unity

    Unity UI Lead Developer

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    Ah yea i never had it set to use the gizmo's in the game view so forgot that was even a option (thanks for the reminder). but either way it shouldn't display in a built version. :)
     
  9. DanSuperGP

    DanSuperGP

    Joined:
    Apr 7, 2013
    Posts:
    408
    You know I've been using Unity since version 2 and I never realized you could turn on Gizmos in the game view.

    Then again, I'm not sure why I ever would...
     
  10. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I tried to turn on some gizmos for some plugin I was using back in Unity 3. And that caused a crash. Every time. So I haven't ever tried it since haha.
     
  11. DeveloperJake

    DeveloperJake

    Joined:
    May 25, 2020
    Posts:
    13
  12. faizanhumayun606

    faizanhumayun606

    Joined:
    May 18, 2023
    Posts:
    1
    thanks it worked