ドキュメント

Unity Engine

Unity Engine

AddComponentMenu

The AddComponentMenu attribute allows you to place a script anywhere in the "Component" menu, instead of just the "Component-\>Scripts" menu.
読み終わるまでの所要時間 3 分最終更新 1ヶ月前

Definition

public sealed class AddComponentMenu : Attribute

Remarks

You can use this to organize the Component menu better and improve the workflow of adding scripts.

Examples

using UnityEngine;[AddComponentMenu("Transform/Follow Transform")]public class FollowTransform : MonoBehaviour{}

Constructors

Constructor

Description

AddComponentMenu(System.String)Add an item in the Component menu.
AddComponentMenu(System.String,System.Int32)Add an item in the Component menu.

Properties

Property

Description

componentOrderThe order of the component in the component menu (lower values appear higher in the menu).

Inheritance

Inherited Members