Wanzyee Studio

Store the asset items to show in a Shortcut window with the layout settings. More...

Inherits ScriptableObject.

Public Member Functions

void InsertItems (ShortcutItem before, params Object[] source)
 Undoable insert the specified item targets to the items list. More...
 
void InsertItems (ShortcutItem before, params ShortcutItem[] source)
 Undoable insert the specified items to the items list. More...
 
void RemoveItems (params ShortcutItem[] source)
 Undoable remove the specified items from the items list. More...
 
List< ShortcutItemGetValidItems ()
 Get new items list with valid target. More...
 
List< Object > GetValidTargets ()
 Get new targets list of all valid items. More...
 
void PerformItem (ShortcutItem item, string act=null)
 Perform the act on the item target, or according to the clicking settings if not specify. More...
 
GUIContent GetItemLabel (ShortcutItem item)
 According to the showing settings to get the specified item label. More...
 

Static Public Member Functions

static string[] GetActs (Object target)
 Get the act names for the specified target instance, return all if pass null. More...
 

Public Attributes

string title = ""
 Custom window title. More...
 
Texture2D icon
 Custom window icon. More...
 
bool search = true
 Show the search bar. More...
 
bool gridView
 Layout as grid or list view. More...
 
int size = 16
 Item icon size. More...
 
bool showLabel = true
 Show the item label. More...
 
bool showTooltip
 Show the item label as tooltip. More...
 
bool clickToOpen = true
 Open the asset when click. More...
 
bool clickToSelect
 Select the asset when click. More...
 
bool dragToArrange = true
 Drag to reorder, add or copy. More...
 
bool enableHotkey
 Listen hotkey to perform an item. More...
 
bool specifyAct
 Specify act to perform when click. More...
 
List< ShortcutItemitems = new List<ShortcutItem>()
 The asset items to show in the window. More...
 

Detailed Description

Store the asset items to show in a Shortcut window with the layout settings.

Member Function Documentation

static string [] GetActs ( Object  target)
static

Get the act names for the specified target instance, return all if pass null.

Parameters
targetTarget instance.
Returns
The act names.
void InsertItems ( ShortcutItem  before,
params Object[]  source 
)

Undoable insert the specified item targets to the items list.

Parameters
beforeItem to insert before.
sourceItem targets to insert.
void InsertItems ( ShortcutItem  before,
params ShortcutItem[]  source 
)

Undoable insert the specified items to the items list.

Parameters
beforeItem to insert before.
sourceItems to insert.
void RemoveItems ( params ShortcutItem[]  source)

Undoable remove the specified items from the items list.

Parameters
sourceItems to remove.
List<ShortcutItem> GetValidItems ( )

Get new items list with valid target.

Returns
The valid items.
List<Object> GetValidTargets ( )

Get new targets list of all valid items.

Returns
The valid targets.
void PerformItem ( ShortcutItem  item,
string  act = null 
)

Perform the act on the item target, or according to the clicking settings if not specify.

Parameters
itemItem.
actAct name.
GUIContent GetItemLabel ( ShortcutItem  item)

According to the showing settings to get the specified item label.

Parameters
itemItem.
Returns
The label.

Member Data Documentation

string title = ""

Custom window title.

Texture2D icon

Custom window icon.

bool search = true

Show the search bar.

bool gridView

Layout as grid or list view.

int size = 16

Item icon size.

bool showLabel = true

Show the item label.

bool showTooltip

Show the item label as tooltip.

bool clickToOpen = true

Open the asset when click.

bool clickToSelect

Select the asset when click.

bool dragToArrange = true

Drag to reorder, add or copy.

bool enableHotkey

Listen hotkey to perform an item.

bool specifyAct

Specify act to perform when click.

List<ShortcutItem> items = new List<ShortcutItem>()

The asset items to show in the window.