DarkRewar / BaseTool

A big library of basic tools that you might need in your Unity projects.
MIT License
41 stars 6 forks source link

Prefix and Suffix attributes #98 #99

Closed DarkRewar closed 4 months ago

DarkRewar commented 4 months ago

SuffixAttribute

This attribute can place a text as suffix in the input field in inspector.

suffix_attribute

using BaseTool;
using UnityEngine;

public class MyClass : MonoBehaviour
{
    [Suffix("m/s")]
    public float Velocity = 10f;
}

PrefixAttribute

This attribute can place a text as prefix before the input field in inspector.

prefix_attribute

using BaseTool;
using UnityEngine;

public class MyClass : MonoBehaviour
{
    [Prefix("m/s")]
    public float Velocity = 10f;
}