public static void ApplyCustom() { var window = RainbowFoldersPopup.GetDraggableWindow(); var position = RainbowFoldersEditorUtility.GetProjectWindow().position.position + new Vector2(10f, 30f); var paths = Selection.assetGUIDs.Select <string, string>(AssetDatabase.GUIDToAssetPath).Where(AssetDatabase.IsValidFolder).ToList(); window.ShowWithParams(position, paths.ToList(), 0); }
private static void ShowPopupWindow(Rect rect, string path) { var window = RainbowFoldersPopup.GetDraggableWindow(); var position = GUIUtility.GUIToScreenPoint(rect.position + new Vector2(0, rect.height + 2)); if (_multiSelection) { // ReSharper disable once RedundantTypeArgumentsOfMethod var paths = Selection.assetGUIDs .Select <string, string>(AssetDatabase.GUIDToAssetPath) .Where(AssetDatabase.IsValidFolder).ToList(); var index = paths.IndexOf(path); window.ShowWithParams(position, paths, index); } else { window.ShowWithParams(position, new List <string> { path }, 0); } }