Beispiel #1
0
        override public bool IsRenamingItemAllowed(TreeViewItem item)
        {
            // Only main representations can be renamed (currently)
            // Root items cannot be renamed
            if (AssetDatabase.IsSubAsset(item.id) || (item.parent == null))
            {
                return(false);
            }

            return(InternalEditorUtility.CanRenameAsset(item.id));
        }
        public override bool IsRenamingItemAllowed(TreeViewItem item)
        {
            // The 'Assets' root and 'Filters' roots are not allowed to be renamed
            if (IsVisibleRootNode(item))
            {
                return(false);
            }

            switch (ProjectBrowser.GetItemType(item.id))
            {
            case ProjectBrowser.ItemType.Asset:
                return(InternalEditorUtility.CanRenameAsset(item.id));

            case ProjectBrowser.ItemType.SavedFilter:
                return(true);

            default:
                return(false);
            }
        }