Используйте этот атрибут для добавления контекстного меню к полю, которое вызывает указанный метод.
@ContextMenuItem ("Reset", "ResetBiography")
@Multiline (8)
var playerBiography : String = "";
function ResetBiography () {
playerBiography = "";
}
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { [ContextMenuItem("Reset", "ResetBiography")] [Multiline(8)] public string playerBiography = ""; void ResetBiography() { playerBiography = ""; } }
| ContextMenuItemAttribute | Используйте этот атрибут для добавления контекстного меню к полю, которое вызывает указанный метод. |
| order | Optional field to specify the order that multiple DecorationDrawers should be drawn in. |