Class Shadow
Implements
Inherited Members
Namespace: UnityEngine .UI
Assembly: UnityEngine.UI.dll
Syntax
[AddComponentMenu("UI/Effects/Shadow", 80)]
public class Shadow : BaseMeshEffect, IMeshModifier
Constructors
Shadow()
Declaration
protected Shadow()
Properties
effectColor
Color for the effect
Declaration
public Color effectColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
effectDistance
How far is the shadow from the graphic.
Declaration
public Vector2 effectDistance { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
useGraphicAlpha
Should the shadow inherit the alpha from the graphic?
Declaration
public bool useGraphicAlpha { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
ApplyShadow(List<UIVertex>, Color32, int, int, float, float)
Duplicate vertices from start to end and turn them into shadows with the given offset.
Declaration
protected void ApplyShadow(List<UIVertex> verts, Color32 color, int start, int end, float x, float y)
Parameters
Type | Name | Description |
---|---|---|
List<UIVertex> | verts | Vert list to copy |
Color32 | color | Shadow color |
int | start | The start index in the verts list |
int | end | The end index in the vers list |
float | x | The shadows x offset |
float | y | The shadows y offset |
ApplyShadowZeroAlloc(List<UIVertex>, Color32, int, int, float, float)
Declaration
protected void ApplyShadowZeroAlloc(List<UIVertex> verts, Color32 color, int start, int end, float x, float y)
Parameters
ModifyMesh(VertexHelper)
Call used to modify mesh. Place any custom mesh processing in this function.
Declaration
public override void ModifyMesh(VertexHelper vh)
Parameters
Type | Name | Description |
---|---|---|
Vertex |
vh |
Overrides
OnValidate()
Declaration
protected override void OnValidate()