Document CenteredGridArrange

This commit is contained in:
wanderingpix committed 2026-08-22 13:37:02 +01:00
1 parent 1254de742a
commit d37222010d
1 file changed
+13 -2
@@ -6,11 +6,22 @@ using UnityEngine;
namespace MiraAPI.Utilities.Components;
/// <summary>
/// Utility component for arranging objects in a centered layout, similar to <see cref="GridArrange"/>.
/// </summary>
/// <param name="ptr"></param>
[RegisterInIl2Cpp]
public class CenteredGridArrange(IntPtr ptr) : MonoBehaviour(ptr)
{
/// <summary>
/// Gets or sets the cell size, which is used for spacing.
/// </summary>
public Vector2 CellSize;
public int MaxColumns = 3;
/// <summary>
/// Gets or sets the maximum amount of columns.
/// </summary>
public int MaxColumns = 6;
private List<Transform> cells;
private static List<Transform> currentChildren = new List<Transform>();
@@ -73,4 +84,4 @@ public class CenteredGridArrange(IntPtr ptr) : MonoBehaviour(ptr)
cell.position = new Vector3(x, y, cell.position.z);
}
}
}
}