https://github.com/alexeytaranov/labelfromstring
(Unity) Editor Inspector Attribute for customize property labels
https://github.com/alexeytaranov/labelfromstring
attributes inspector unity unity3d unityeditor
Last synced: about 2 months ago
JSON representation
(Unity) Editor Inspector Attribute for customize property labels
- Host: GitHub
- URL: https://github.com/alexeytaranov/labelfromstring
- Owner: AlexeyTaranov
- Created: 2022-10-31T19:26:39.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-12T12:03:07.000Z (over 1 year ago)
- Last Synced: 2024-09-12T22:29:39.600Z (over 1 year ago)
- Topics: attributes, inspector, unity, unity3d, unityeditor
- Language: C#
- Homepage:
- Size: 76.2 KB
- Stars: 11
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LabelFromString Attribute
## (Unity) Editor Inspector Attribute for customize property labels
#### Attribute in action!

#### Without Attribute

### How to Use?
##### 1) Add attribute to property.
##### 2) Override ToString()!
### Installation:
1. Select in UPM "Add package from git URL..."
2. Install package with link.
```
https://github.com/AlexeyTaranov/LabelFromString.git
```
### LabelFromString Example:
```csharp
[LabelFromString]
public NamedShape SingleNamedShape;
[Serializable]
public class NamedShape
{
public int Index;
public string Name;
public Vector3 Position;
public override string ToString()
{
return $"{Index} {Name}, Position - {Position}";
}
}
```