Update Cryville.Common.

This commit is contained in:
2022-10-14 23:32:43 +08:00
parent d3cac8a28d
commit c8eee7ab3f
18 changed files with 497 additions and 47 deletions

View File

@@ -2,9 +2,16 @@
using UnityEngine.UI;
namespace Cryville.Common.Unity.UI {
/// <summary>
/// Fits the length of an axis of an element with respect to the children count and the shared aspect ratio.
/// </summary>
public class LayoutAspectRatioFitter : MonoBehaviour {
[SerializeField]
[Tooltip("The aspect ratio per element.")]
private float m_aspectRatioPerElement = 1;
/// <summary>
/// The aspect ratio per element.
/// </summary>
public float AspectRatioPerElement {
get { return m_aspectRatioPerElement; }
set { m_aspectRatioPerElement = value; }