Skip to content

(Unity) Editor Inspector Attribute for customize property labels

Notifications You must be signed in to change notification settings

AlexeyTaranov/LabelFromString

Repository files navigation

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:

    [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}";
        }
    }

About

(Unity) Editor Inspector Attribute for customize property labels

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages