| | 1 | | // Copyright (c) 2020-2024 dotBunny Inc. |
| | 2 | | // dotBunny licenses this file to you under the BSL-1.0 license. |
| | 3 | | // See the LICENSE file in the project root for more information. |
| | 4 | |
|
| | 5 | | using System; |
| | 6 | |
|
| | 7 | | namespace GDX.Collections |
| | 8 | | { |
| | 9 | | /// <summary> |
| | 10 | | /// A struct purely created to allow for serialization of multi-dimensional arrays. |
| | 11 | | /// </summary> |
| | 12 | | /// <typeparam name="T"></typeparam> |
| | 13 | | [Serializable] |
| | 14 | | public struct ArrayHolder<T> |
| | 15 | | { |
| | 16 | | public T[] TArray; |
| | 17 | |
|
| 1145 | 18 | | public ref T this[int index] => ref TArray[index]; |
| | 19 | | } |
| | 20 | | } |