Skip to content

Commit a0951ee

Browse files
committed
Update README with EnumBitSet64 and property drawer screenshot
1 parent 7537a7c commit a0951ee

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

Extras~/CustomDrawer.png

24 KB
Loading

README.md

+23-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,27 @@
11
# EnumBitSet
22
A memory efficient `ISet` for enums that store data using bit masks for C#.
33

4-
Currently, there is an implementation using `int` as data (`EnumBitSet32<T>`),
5-
supporting enums with up to 32 values.
4+
Current implementations:
5+
- `EnumBitSet32<T>`: uses `int` as data, supporting enums with up to 32 values.
6+
- `EnumBitSet64<T>`: uses `long` as data, supporting enums with up to 64 values.
67

7-
In Unity, there's a custom property drawer for selecting the containing enums.
8+
## Unity Property Drawer
9+
In Unity, there's a custom property drawer for selecting the containing enums:
10+
11+
```cs
12+
using EnumBitSet;
13+
using UnityEngine;
14+
15+
public class ScriptWithEnumSet : MonoBehaviour
16+
{
17+
public enum TestEnum
18+
{
19+
Zero, One, Two, Three
20+
}
21+
22+
public EnumBitSet32<TestEnum> aBitset;
23+
public EnumBitSet64<TestEnum> anotherBitset;
24+
}
25+
```
26+
27+
![](Extras~/CustomDrawer.png)

0 commit comments

Comments
 (0)