Skip to content

Commit 4630c9a

Browse files
committed
Update: README.md, samples
1 parent e2c6d98 commit 4630c9a

File tree

6 files changed

+47
-37
lines changed

6 files changed

+47
-37
lines changed

Assets/Editor Toolbox/README.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -242,22 +242,6 @@ public string password;
242242

243243
![inspector](https://github.com/arimger/Unity-Editor-Toolbox/blob/develop/Docs/password.png)
244244

245-
#### ChildObjectOnlyAttribute
246-
247-
Supported types: **GameObject, Component**.
248-
249-
#### SceneObjectOnlyAttribute
250-
251-
Supported types: **GameObject, Component**.
252-
253-
#### PrefabObjectOnlyAttribute
254-
255-
Supported types: **GameObject, Component**.
256-
257-
#### NotPrefabObjectOnlyAttribute
258-
259-
Supported types: **GameObject, Component**.
260-
261245
#### LeftToggleAttribute
262246

263247
Supported types: **bool**.
@@ -281,9 +265,27 @@ Supported types: **int**.
281265

282266
```csharp
283267
[Layer]
284-
public int var1;
268+
public int layer;
285269
```
286270

271+
![inspector](https://github.com/arimger/Unity-Editor-Toolbox/blob/develop/Docs/layer.png)
272+
273+
#### ChildObjectOnlyAttribute
274+
275+
Supported types: **GameObject, Component**.
276+
277+
#### SceneObjectOnlyAttribute
278+
279+
Supported types: **GameObject, Component**.
280+
281+
#### PrefabObjectOnlyAttribute
282+
283+
Supported types: **GameObject, Component**.
284+
285+
#### NotPrefabObjectOnlyAttribute
286+
287+
Supported types: **GameObject, Component**.
288+
287289
---
288290

289291
### Toolbox Drawers <a name="toolboxdrawers"></a>
@@ -728,7 +730,7 @@ public class GenericInterfaceImplementation<TValue> : IGenericInterface<TValue>
728730
729731
##### SerializeReference context menu operations
730732

731-
You can use few custom context menu operations for the SerializeReference-based fields:
733+
You can use few custom context menu operations for the **[SerializeReference]** fields:
732734
- **Copy Serialize Reference**: creates a deep copy of the linked reference
733735
- **Paste Serialize Reference**: allows to paste preserved copy to a field
734736
- **Duplicate Serialize Reference**: allows to duplicate the linked reference (works only on collection elements)

Assets/Examples/Scenes/SampleScene.unity

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1299,7 +1299,8 @@ MonoBehaviour:
12991299
password: password
13001300
bigNumber: 12345678
13011301
currency: 20.41
1302-
clampedValue: 4.699999809265137
1302+
layer: 5
1303+
clampedValue: 6
13031304
notNullReference: {fileID: 0}
13041305
childReference: {fileID: 0}
13051306
sceneReference: {fileID: 0}

Assets/Examples/Scripts/SampleBehaviour1.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ public enum FlagExample
9696
[FormattedNumber("c")]
9797
public float currency;
9898

99+
[Label("Layer", skinStyle: SkinStyle.Box)]
100+
101+
[Layer]
102+
public int layer;
103+
99104
[BeginGroup(Order = -2)]
100105

101106
[Help("NotNullAttribute, ClampAttribute, SceneObjectOnlyAttribute, ChildObjectOnlyAttribute, PrefabObjectOnlyAttribute " +

Docs/layer.png

5.93 KB
Loading
File renamed without changes.

README.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -242,22 +242,6 @@ public string password;
242242

243243
![inspector](https://github.com/arimger/Unity-Editor-Toolbox/blob/develop/Docs/password.png)
244244

245-
#### ChildObjectOnlyAttribute
246-
247-
Supported types: **GameObject, Component**.
248-
249-
#### SceneObjectOnlyAttribute
250-
251-
Supported types: **GameObject, Component**.
252-
253-
#### PrefabObjectOnlyAttribute
254-
255-
Supported types: **GameObject, Component**.
256-
257-
#### NotPrefabObjectOnlyAttribute
258-
259-
Supported types: **GameObject, Component**.
260-
261245
#### LeftToggleAttribute
262246

263247
Supported types: **bool**.
@@ -281,9 +265,27 @@ Supported types: **int**.
281265

282266
```csharp
283267
[Layer]
284-
public int var1;
268+
public int layer;
285269
```
286270

271+
![inspector](https://github.com/arimger/Unity-Editor-Toolbox/blob/develop/Docs/layer.png)
272+
273+
#### ChildObjectOnlyAttribute
274+
275+
Supported types: **GameObject, Component**.
276+
277+
#### SceneObjectOnlyAttribute
278+
279+
Supported types: **GameObject, Component**.
280+
281+
#### PrefabObjectOnlyAttribute
282+
283+
Supported types: **GameObject, Component**.
284+
285+
#### NotPrefabObjectOnlyAttribute
286+
287+
Supported types: **GameObject, Component**.
288+
287289
---
288290

289291
### Toolbox Drawers <a name="toolboxdrawers"></a>
@@ -728,7 +730,7 @@ public class GenericInterfaceImplementation<TValue> : IGenericInterface<TValue>
728730
729731
##### SerializeReference context menu operations
730732

731-
You can use few custom context menu operations for the SerializeReference-based fields:
733+
You can use few custom context menu operations for the **[SerializeReference]** fields:
732734
- **Copy Serialize Reference**: creates a deep copy of the linked reference
733735
- **Paste Serialize Reference**: allows to paste preserved copy to a field
734736
- **Duplicate Serialize Reference**: allows to duplicate the linked reference (works only on collection elements)

0 commit comments

Comments
 (0)