C# Class UnityPickers.AssetPicker

Inheritance: EditorWindow
Show file Open project: vasyab/UnityPickers Class Usage Examples

Public Properties

Property Type Description
DependenciesFilters bool>>.List

Private Properties

Property Type Description
AddAssetInfo void
AssetPicker System
BuildFlatAssets void
DisplayAsset void
DisplayList void
FilterAssets void
FitsFilters bool
GetFilter string
HandleKeyDown void
InitStyles void
MatchesLabels bool
MatchesName bool
OnAssetHover void
OnAssetSelected void
OnDisable void
OnEnable void
OnGUI void
OpenWindow void
SortChildren void
UpdateAssetList void
UpdateFilter void
UpdateFilterRecursive bool

Public Methods

Method Description
CollectAssetTypes ( ) : IEnumerable
ObjectField ( Rect position, Object currentValue, Action pickCallback, GUIContent label, Type assetType, Func filter = null ) : void
PropertyField ( Rect position, SerializedProperty property, FieldInfo fieldInfo, GUIContent label, Type assetType, Func filter = null ) : void

Shows built-in ObjectField, but overrides thumb button to call our AssetPicker window instead

PropertyField ( Rect position, SerializedProperty property, FieldInfo fieldInfo, Object currentValue, Action pickCallback, GUIContent label, Type assetType, Func filter = null ) : void

Shows built-in ObjectField with custom value source and pick target

Show ( Type assetType, FieldInfo fieldInfo, Action callback, Object selectedAsset = null, Func filter = null ) : void
Show ( Action callback, Array labels = null, bool enableSelectionOnClick = false, Object selectedAsset = null ) : void

Private Methods

Method Description
AddAssetInfo ( HierarchyProperty hp ) : void
AssetPicker ( ) : System
BuildFlatAssets ( List entries ) : void
DisplayAsset ( HierarchyEntry entry ) : void
DisplayList ( List list ) : void
FilterAssets ( List &entries ) : void
FitsFilters ( HierarchyEntry he ) : bool
GetFilter ( ) : string
HandleKeyDown ( ) : void
InitStyles ( ) : void
MatchesLabels ( HierarchyEntry entry ) : bool
MatchesName ( HierarchyEntry entry ) : bool
OnAssetHover ( bool scrollToAsset = true ) : void
OnAssetSelected ( ) : void
OnDisable ( ) : void
OnEnable ( ) : void
OnGUI ( ) : void
OpenWindow ( ) : void
SortChildren ( HierarchyEntry entry ) : void
UpdateAssetList ( ) : void
UpdateFilter ( ) : void
UpdateFilterRecursive ( List list ) : bool

Method Details

CollectAssetTypes() public method

public CollectAssetTypes ( ) : IEnumerable
return IEnumerable

ObjectField() public static method

public static ObjectField ( Rect position, Object currentValue, Action pickCallback, GUIContent label, Type assetType, Func filter = null ) : void
position Rect
currentValue UnityEngine.Object
pickCallback Action
label GUIContent
assetType Type
filter Func
return void

PropertyField() public static method

Shows built-in ObjectField, but overrides thumb button to call our AssetPicker window instead
public static PropertyField ( Rect position, SerializedProperty property, FieldInfo fieldInfo, GUIContent label, Type assetType, Func filter = null ) : void
position Rect
property SerializedProperty
fieldInfo FieldInfo
label GUIContent
assetType Type
filter Func
return void

PropertyField() public static method

Shows built-in ObjectField with custom value source and pick target
public static PropertyField ( Rect position, SerializedProperty property, FieldInfo fieldInfo, Object currentValue, Action pickCallback, GUIContent label, Type assetType, Func filter = null ) : void
position Rect
property SerializedProperty
fieldInfo FieldInfo
currentValue UnityEngine.Object
pickCallback Action
label GUIContent
assetType Type
filter Func
return void

Show() public static method

public static Show ( Type assetType, FieldInfo fieldInfo, Action callback, Object selectedAsset = null, Func filter = null ) : void
assetType Type
fieldInfo FieldInfo
callback Action
selectedAsset UnityEngine.Object
filter Func
return void

Show() public static method

public static Show ( Action callback, Array labels = null, bool enableSelectionOnClick = false, Object selectedAsset = null ) : void
callback Action
labels Array
enableSelectionOnClick bool
selectedAsset UnityEngine.Object
return void

Property Details

DependenciesFilters public static property

public static List> DependenciesFilters
return bool>>.List