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

rendersprite 2d opacity

Discussion in 'Scripting' started by Vindatra14, Nov 16, 2015.

  1. Vindatra14

    Vindatra14

    Joined:
    May 8, 2015
    Posts:
    87
    Hi excuse me, I want ask about changing opacity of 2d texture. I find many ways about new color but it will affect the r g b too, how possible I can change my 2d gameobject opacity only without affect the r g b ?? any help will be appreciate
     
  2. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Code (CSharp):
    1. Color someColor = Color.red;
    2. someColor.a = 0;
     
  3. Vindatra14

    Vindatra14

    Joined:
    May 8, 2015
    Posts:
    87
    ohh I get it know, thanks hahahha, I make some gameobjet name with a too, that's why I get error. Thanks 4 ur help