English | 日本語
StandardUI is a Unity package that provides extra uGUI components and effects.
| Component | Description |
|---|---|
EmptyGraphic |
A no-op Graphic component. Useful as a mask base, full-screen transparent overlay, or a transparent hit area for buttons. |
PropagationGraphic |
Forwards Selectable color transitions to child Graphic components. |
SafeArea |
Adjusts a RectTransform to match the device safe area. |
SimpleGauge |
A simple and clean gauge display built on top of RectMask2D. |
SkewMeshEffect |
A BaseMeshEffect that skews a uGUI mesh diagonally. |
TouchSurface |
Controls UI input, such as temporarily blocking all uGUI interaction. |
- Unity 2021.3 or later
- com.unity.ugui 1.0.0 or later
Open Window > Package Manager, select [+] > Add package from git URL, and enter the following URL:
https://github.com/AndanteTribe/StandardUI.git?path=src/StandardUI.Unity/Packages/jp.andantetribe.standardui
Add the EmptyGraphic component to a GameObject to create a transparent, non-rendering UI element — ideal for button hit areas or mask bases.
Attach PropagationGraphic to a parent Selectable to propagate its color transitions to child Graphic components.
// Child graphics are automatically discovered via Reset() in the Editor,
// or you can assign them manually in the Inspector.Attach the SafeArea component to a RectTransform to automatically fit the layout to the device's safe area.
Add the SimpleGauge component to a GameObject that has a MaskableGraphic and control the fill via the Value property.
using StandardUI;
using UnityEngine;
public class GaugeSample : MonoBehaviour
{
[SerializeField] private SimpleGauge _gauge;
private void Update()
{
// Set gauge fill (0.0 to 1.0)
_gauge.Value = Mathf.PingPong(Time.time * 0.5f, 1f);
}
}Add the SkewMeshEffect component to an Image to apply a diagonal skew to the mesh — useful for creating slanted gauge fills or stylised UI elements.
Use TouchSurface to temporarily disable all uGUI input during long or asynchronous operations.
using StandardUI;
using UnityEngine;
public class TouchSurfaceSample : MonoBehaviour
{
private readonly TouchSurface _touchSurface = new TouchSurface();
private void SomeOperation()
{
// Disable all UI input during processing and restore it automatically
// when leaving the using scope.
using (_touchSurface.BlockScope())
{
// Perform long or asynchronous operations here.
}
}
}| Member | Description |
|---|---|
SetMaterialDirty() |
No-op override. |
SetVerticesDirty() |
No-op override. |
| Member | Description |
|---|---|
CrossFadeColor(Color, float, bool, bool) |
Forwards the color transition to all assigned child Graphic components. |
| Member | Description |
|---|---|
Adjust() |
Applies the current safe area to this RectTransform's anchors. |
| Member | Description |
|---|---|
Value |
Gets or sets the gauge fill (0.0 to 1.0). Setting this updates the RectMask2D padding. |
| Member | Description |
|---|---|
ModifyMesh(VertexHelper) |
Applies the skew transform to every vertex in the mesh. |
| Member | Description |
|---|---|
BlockScope() |
Disables UI input and returns a BlockingScope that re-enables it on Dispose. |
This library is released under the MIT license.