Add ultimate xr

This commit is contained in:
2024-08-06 21:58:35 +02:00
parent 864033bf10
commit 7165bacd9d
3952 changed files with 2162037 additions and 35 deletions

View File

@@ -0,0 +1,32 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="GraphicExt.cs" company="VRMADA">
// Copyright (c) VRMADA, All rights reserved.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------
using UnityEngine;
using UnityEngine.UI;
namespace UltimateXR.Extensions.Unity.UI
{
/// <summary>
/// <see cref="Graphic" /> extensions.
/// </summary>
public static class GraphicExt
{
#region Public Methods
/// <summary>
/// Sets the alpha value of a <see cref="Graphic" /> component.
/// </summary>
/// <param name="graphic">Target <see cref="Graphic" /> component to set the alpha value of</param>
/// <param name="alpha">New alpha value</param>
public static void SetAlpha(this Graphic graphic, float alpha)
{
Color color = graphic.color;
color.a = alpha;
graphic.color = color;
}
#endregion
}
}