IconAttribute
Attribute to specify an icon for a MonoBehaviour, a ScriptableObject, or a struct that implements IComponentData.
Read time 3 minutesLast updated 7 days ago
Definition
- Type: Class
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
- Inherits from: Attribute
[Conditional("UNITY_EDITOR")][AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct, Inherited = true, AllowMultiple = false)]public class IconAttribute : Attribute
Remarks
Unity ignores this attribute on a MonoBehaviour or an IComponentData struct in the global namespace. To use a custom icon for these types, declare the type in a namespace.
Constructors
Constructor | Description |
|---|---|
| IconAttribute(System.String) | Create an IconAttribute with a path to an icon. |
Properties
Property | Description |
|---|---|
| path | A project-relative path to a texture. |