Reference
This page is dedicated for explaining scripting api references.
EditorActionButtonAttribute
type
parameter
description
//Method can have both single parameter or array parameter.
//Array sends all selected contexts and single sends only the first from selected.
[EditorActionButton("print", typeof(Transform), "SubFolder/example.png",
"Print transform position", 0)]
private static void PrintTransform(Object context)
{
Debug.Log(((Transform)context).position);
}
//---------------or---------------
[EditorActionButton("print", typeof(Transform), "SubFolder/example.png",
"Print transform position", 0)]
private static void PrintTransform(Object[] contexts)
{
foreach(var context in contexts)
{
Debug.Log(((Transform)context).position);
}
}EditorActionButtonValidateAttribute
type
parameter
description
return type
description
GameObjectActionButtonAttribute
type
parameter
description
GameObjectActionButtonValidateAttribute
type
parameter
description
Last updated