Unity C# Change Object Transparency
Channel:
Subscribers:
33,700
Published on ● Video Link: https://www.youtube.com/watch?v=hXUMdWXr2so
The only commands you need for this one are:
1. Declare a float variable
2. GetComponent SpriteRenderer, setting the fourth value to the float declared in step 1.
3. A statement to change that float variable based on some condition.
I included the Keycode commands really just as a quick way of changing the alpha value. Instead you could change the alpha variable based on a collision or based on passage of time or some other factor.
Other Videos By Design and Deploy
2015-10-22 | Anime Studio Pro -Switch Layer - Using Switch Layer to Emulate 3D Objects |
2015-10-17 | Anime Studio Pro - Changing Opacity over Time - Example 1 - Ghost |
2015-10-12 | Anime Studio Pro - Bouncing and Distortion - Ex 1-Translate Point Tool |
2015-09-13 | Unity C# - GetComponent Tutorial Example 1 |
2015-08-25 | Unity C# - Prefabs and Instantiation - Example 2 Projectiles |
2015-08-24 | Unity C# - Creating and Instantiating Prefabs - Example 1 Tiling |
2015-08-21 | Unity C# - Collision detection and destroying objects |
2015-08-20 | Unity C# - Mouse Over Text / Clickable text |
2015-08-19 | Unity C# - Full Screen Fade |
2015-08-17 | Unity C# How to add a Delay / Timer |
2015-08-16 | Unity C# Change Object Transparency |
2015-08-16 | Unity C# How to rotate an object using key press |
2015-08-16 | Unity C# Move an Object with a Key press |
Tags:
C# (Programming Language)
Unity (Software)