SaintsArray2DR<>Unity does not serialize two-dimensional rectangular arrays (T[,]).
Use SaintsArray2DR<T> when you need an editable rectangular array on a regular Unity-serialized field.
The inspector draws the value as a grid. Use the W and H controls to change its column and row counts.
SaintsArray2DR<T> converts implicitly to and from T[,].
Use [SaintsArray2DR] change settings:
bool transpose: when true, forT[a, b], use a as height (row) and b as width (col)
using SaintsField; public SaintsArray2DR<bool> array2Dr; // reverse x, y direction [SaintsArray2DR(transpose: true)] public SaintsArray2DR<bool> array2DrRev; private void Awake() { bool[,] to2D = array2Dr; // convert to SaintsArray2DR<bool> from2D = array2DrRev; // convert from }
It works with ShowInInspector & Button
[ShowInInspector] private bool[,] ShowArray2DSerialized { get => array2DSerialized; set => array2DSerialized = value; }
