Skip to content

Commit 382a09e

Browse files
committed
Update documentation & package.json
1 parent 3691876 commit 382a09e

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

Assets/Editor Toolbox/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,14 @@ public int presetTarget;
167167

168168
![inspector](https://github.com/arimger/Unity-Editor-Toolbox/blob/develop/Docs/preset.png)
169169

170+
```csharp
171+
private readonly int[] presetValues = new[] { 1, 2, 3, 4, 5 };
172+
private readonly string[] optionLabels = new[] { "a", "b", "c", "d", "e" };
173+
174+
[Preset(nameof(presetValues), nameof(optionLabels))]
175+
public int presetTarget;
176+
```
177+
170178
#### SearchableEnumAttribute
171179

172180
```csharp

Assets/Editor Toolbox/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "com.arimger.editor-toolbox",
33
"displayName": "Editor Toolbox",
4-
"version": "0.11.1",
4+
"version": "0.11.3",
55
"unity": "2018.1",
66
"description": "Tools, custom attributes, drawers, hierarchy overlay, and other extensions for the Unity Editor.",
77
"keywords": [

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,14 @@ public int presetTarget;
167167

168168
![inspector](https://github.com/arimger/Unity-Editor-Toolbox/blob/develop/Docs/preset.png)
169169

170+
```csharp
171+
private readonly int[] presetValues = new[] { 1, 2, 3, 4, 5 };
172+
private readonly string[] optionLabels = new[] { "a", "b", "c", "d", "e" };
173+
174+
[Preset(nameof(presetValues), nameof(optionLabels))]
175+
public int presetTarget;
176+
```
177+
170178
#### SearchableEnumAttribute
171179

172180
```csharp

0 commit comments

Comments
 (0)