Skip to content

Commit

Permalink
Move InlineEditor to decorators
Browse files Browse the repository at this point in the history
  • Loading branch information
vanifatovvlad committed Apr 5, 2023
1 parent d295784 commit 0fd77fe
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Editor.Extras/Drawers/InlineEditorDrawer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using UnityEngine;
using Object = UnityEngine.Object;

[assembly: RegisterTriAttributeDrawer(typeof(InlineEditorDrawer), TriDrawerOrder.Drawer - 100,
[assembly: RegisterTriAttributeDrawer(typeof(InlineEditorDrawer), TriDrawerOrder.Decorator,
ApplyOnArrayElement = true)]

namespace TriInspector.Drawers
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using TriInspector;
using UnityEngine;

public class Styling_InlineEditorSample : ScriptableObject
public class Decorators_InlineEditorSample : ScriptableObject
{
[InlineEditor]
public Material mat;
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,15 @@ private IEnumerable<TriDropdownItem<Vector3>> GetVectorValues()
[Scene] public string scene;
```

#### InlineEditor

![InlineEditor](https://user-images.githubusercontent.com/26966368/168234617-86a7f500-e635-46f8-90f2-5696e5ae7e63.png)

```csharp
[InlineEditor]
public Material mat;
```

#### DisplayAsString

![DisplayAsString](https://user-images.githubusercontent.com/26966368/224530522-8aa24fbe-4bc7-4290-89d1-d88c5c502e2b.png)
Expand Down Expand Up @@ -392,15 +401,6 @@ public Vector3 vec;
public string DynamicTooltip => DateTime.Now.ToShortTimeString();
```

#### InlineEditor

![InlineEditor](https://user-images.githubusercontent.com/26966368/168234617-86a7f500-e635-46f8-90f2-5696e5ae7e63.png)

```csharp
[InlineEditor]
public Material mat;
```

#### InlineProperty

![InlineProperty](https://user-images.githubusercontent.com/26966368/168234909-1e6bec90-18ed-4d56-91ca-fe09118e1b72.png)
Expand Down

0 comments on commit 0fd77fe

Please sign in to comment.