Skip to content

Instantly share code, notes, and snippets.

@a-gruzdev
a-gruzdev / EnumArray.cs
Last active December 13, 2024 16:05
Fixed length array associated with any enum and with handy PropertyDrawer
using System;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
[Serializable]
public class EnumArray<E, T> : ISerializationCallbackReceiver where E : Enum
{
public static readonly int s_Length;