miepzerino
2025-03-30 d2ab30e7a69bfe7efda63ae75812207377917bd3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using UnityEngine;
 
namespace Flexalon
{
    /// <summary> A layout determines how the children of a node are positioned. </summary>
    public interface Layout
    {
        /// <summary> Perform minimal work to determine what the size of node and available size for node's children. </summary>
        Bounds Measure(FlexalonNode node, Vector3 size, Vector3 min, Vector3 max);
 
        /// <summary> Position the children of node within the available bounds. </summary>
        void Arrange(FlexalonNode node, Vector3 layoutSize);
    }
 
    /// <summary> A constraint runs whenever a target layout is updated. </summary>
    public interface Constraint
    {
        GameObject Target { get; }
        void Constrain(FlexalonNode node);
    }
}