format
typescript
Color.Set(index, value)class: Color
description
Get the color component based on the given index.
This method is commonly used to adjust the color of materials, graphics, or particle effects to achieve different visual effects.
parameter
| param_name | type | description |
|---|---|---|
| index | number | 0 to set the red component (range from 0 to 1); 1 to set the green component (range from 0 to 1); 2 to set the blue component (range from 0 to 1); 3 to set the alpha component (0 is transparent, 1 is opaque). |
| value | number | the corresponding component value |
reture
| type | description |
|---|---|
void |
