The E2Chart asset provides a flexible data visualization framework within Unity’s uGUI (Unity User Interface) system. Rendering dynamic graphs, bar charts, gauge indicators, and pie charts inside a game engine requires balancing visual fidelity against draw call overhead and canvas batching efficiency. E2Chart addresses this by utilizing procedural mesh generation derived from Unity's Graphic and MaskableGraphic base classes rather than instantiating hundreds of standalone UI GameObjects for individual data points.
From a UI architectural standpoint, high-frequency chart updates can degrade frame rates if managed incorrectly. Whenever a vertex position, color, or UV coordinate changes inside a standard uGUI element, Unity sets the parent Canvas as dirty, forcing a complete rebuild of the Canvas batch mesh. When integrating E2Chart into active HUDs or telemetry dashboards, isolating chart components onto dedicated Sub-Canvases (adding a child Canvas component to the chart root) ensures that frequent data updates do not dirty the broader UI hierarchy, keeping main UI draw calls stable.
Transform objects per data entry.CanvasRenderer batch, restricting geometry rebuilds strictly to local graph viewports.SpriteAtlas system to ensure icons, legend symbols, and background borders share unified texture units.Designing responsive graphs requires precise configuration of anchor points and pivot transformations across varying screen aspect ratios. E2Chart relies on Unity's RectTransform system to automatically adapt chart boundaries, grid lines, and axis labels to parent container dimensions. However, using native auto-layout components like ContentSizeFitter or VerticalLayoutGroup directly on dynamic UI elements can trigger costly layout recalculations during runtime data injections.
To maintain high performance on mobile devices and high-density displays, configure the root Canvas Scaler component to Scale With Screen Size using an explicit reference resolution (such as 1920x1080). Coupling this setup with fixed anchor bounds allows E2Chart's internal layout engines to scale font sizes and line stroke widths deterministically without relying on recursive uGUI auto-layout passes.
The following example demonstrates how to inject series data dynamically into an E2Chart component while maintaining proper execution safety and object lifecycle control:
using UnityEngine;
using E2C;
[RequireComponent(typeof(E2Chart))]
public class TelemetryChartController : MonoBehaviour
{
private E2Chart chartInstance;
private CanvasGroup chartCanvasGroup;
private void Awake()
{
chartInstance = GetComponent<E2Chart>();
chartCanvasGroup = GetComponent<CanvasGroup>();
if (chartCanvasGroup == null)
{
chartCanvasGroup = gameObject.AddComponent<CanvasGroup>();
}
}
public void PopulateTelemetryData(float[] datasetValues, string seriesTitle)
{
if (chartInstance == null || datasetValues == null || datasetValues.Length == 0)
return;
// Reset existing chart data to clear vertex buffers
chartInstance.ClearOptions();
// Construct new structured series
E2ChartData.Series newSeries = new E2ChartData.Series
{
name = seriesTitle
};
for (int i = 0; i < datasetValues.Length; i++)
{
newSeries.data.Add(datasetValues[i]);
}
// Apply updated series and trigger internal mesh rebuild
chartInstance.UpdateChart(newSeries);
}
}
Interactive charts rely heavily on Unity's EventSystem to process pointer clicks, hovering, and tooltip triggers. E2Chart implements event interfaces such as IPointerClickHandler and IPointerEnterHandler to map user input back to underlying dataset indices. Improper configuration of these raycast listeners can introduce substantial CPU overhead during frame evaluation.
To maintain optimal input performance, ensure that static graphical elements—such as background grid lines, tick marks, and decorative axis text—have Raycast Target disabled inside their respective Graphic options. Only primary data point triggers (e.g., interactive nodes or active bar elements) should receive raycasts from the active GraphicRaycaster.
EventSystem.CanvasGroup.alpha rather than toggling GameObject.SetActive(). This maintains low memory overhead by preserving pre-compiled vertex buffers.| Category | Tools / GUI |
|---|---|
| Latest Version | v3.3.2 |
| File Size | 3.12 MB |
| Added to Platform | February 6, 2026 |
| Views | 2 views |
| Downloads | 1 downloads |
| Favourites | 0 favourites |
| Official Store | Buy Original License on Unity Asset Store → |
| Issue with Package? | Report Broken Link → |