Generated geometry class. All widgets have one. This class separates the geometry creation into several steps, making it possible to perform actions selectively depending on what has changed. For example, the widget doesn't need to be rebuilt unless something actually changes, so its geometry can be cached. Likewise, the widget's transformed coordinates only change if the widget's transform moves relative to the panel, so that can be cached as well. In the end, using this class means using more memory, but at the same time it allows for significant performance gains, especially when using widgets that spit out a lot of vertices, such as UILabels.
More...
|
void | Clear () |
| Step 1: Prepare to fill the buffers – make them clean and valid. More...
|
|
void | ApplyTransform (Matrix4x4 widgetToPanel) |
| Step 2: Transform the vertices by the provided matrix. More...
|
|
void | WriteToBuffers (BetterList< Vector3 > v, BetterList< Vector2 > u, BetterList< Color32 > c, BetterList< Vector3 > n, BetterList< Vector4 > t) |
| Step 3: Fill the specified buffer using the transformed values. More...
|
|
|
BetterList< Vector3 > | verts = new BetterList<Vector3>() |
| Widget's vertices (before they get transformed). More...
|
|
BetterList< Vector2 > | uvs = new BetterList<Vector2>() |
| Widget's texture coordinates for the geometry's vertices. More...
|
|
BetterList< Color32 > | cols = new BetterList<Color32>() |
| Array of colors for the geometry's vertices. More...
|
|
Generated geometry class. All widgets have one. This class separates the geometry creation into several steps, making it possible to perform actions selectively depending on what has changed. For example, the widget doesn't need to be rebuilt unless something actually changes, so its geometry can be cached. Likewise, the widget's transformed coordinates only change if the widget's transform moves relative to the panel, so that can be cached as well. In the end, using this class means using more memory, but at the same time it allows for significant performance gains, especially when using widgets that spit out a lot of vertices, such as UILabels.
void UIGeometry.ApplyTransform |
( |
Matrix4x4 |
widgetToPanel | ) |
|
Step 2: Transform the vertices by the provided matrix.
void UIGeometry.Clear |
( |
| ) |
|
Step 1: Prepare to fill the buffers – make them clean and valid.
void UIGeometry.WriteToBuffers |
( |
BetterList< Vector3 > |
v, |
|
|
BetterList< Vector2 > |
u, |
|
|
BetterList< Color32 > |
c, |
|
|
BetterList< Vector3 > |
n, |
|
|
BetterList< Vector4 > |
t |
|
) |
| |
Step 3: Fill the specified buffer using the transformed values.
BetterList<Color32> UIGeometry.cols = new BetterList<Color32>() |
Array of colors for the geometry's vertices.
BetterList<Vector2> UIGeometry.uvs = new BetterList<Vector2>() |
Widget's texture coordinates for the geometry's vertices.
BetterList<Vector3> UIGeometry.verts = new BetterList<Vector3>() |
Widget's vertices (before they get transformed).
bool UIGeometry.hasTransformed |
|
get |
Whether the geometry has usable transformed vertex data.
bool UIGeometry.hasVertices |
|
get |
Whether the geometry contains usable vertices.
The documentation for this class was generated from the following file: