Hello! Who knows, please tell us! How can I change the transparency of the material through the code? I have an object, and it is necessary that when I press the button, it becomes half transparent, and that it would be visible what is inside this object. Rummaged on the Internet, but did not really find anything! :(

    1 answer 1

    Through the material.

    So I found this example:

    enter image description here

    And then in the script you change the alpha channel:

    gameObject.GetComponent<Material>().color = new Color(r,g,b,a); 
    • I apologize, I asked a separate question. Through startSpeed ​​also tried, does not work. StartLifeTime changes the values ​​in the particle itself, but its length does not change - dreenline