Skip to content

Commit

Permalink
feat: Replace 'Print Guid' and 'Print Path' with 'Copy Guid' and 'Cop…
Browse files Browse the repository at this point in the history
…y Path'
  • Loading branch information
SolarianZ committed Oct 11, 2023
1 parent 9962383 commit c29fcca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions Editor/Scripts/AssetItemView.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using UnityEditor;
using UnityEngine;
using UnityEngine.UIElements;
using UDebug = UnityEngine.Debug;
using UObject = UnityEngine.Object;

namespace GBG.AssetQuickAccess.Editor
Expand Down Expand Up @@ -190,8 +189,10 @@ private void OnContextClick(Vector2 mousePosition)
menu.AddItem("Ping", false, () => EditorGUIUtility.PingObject(AssetHandle.Asset));
menu.AddItem("Open", false, () => AssetDatabase.OpenAsset(AssetHandle.Asset));
menu.AddItem("Ping", false, () => EditorGUIUtility.PingObject(AssetHandle.Asset));
menu.AddItem("Print Guid", false, () => UDebug.Log(AssetHandle.Guid, AssetHandle.Asset));
menu.AddItem("Print Path", false, () => UDebug.Log(AssetDatabase.GUIDToAssetPath(AssetHandle.Guid), AssetHandle.Asset));
menu.AddItem("Copy Guid", false, () => GUIUtility.systemCopyBuffer = AssetHandle.Guid);
menu.AddItem("Copy Path", false, () => GUIUtility.systemCopyBuffer = AssetDatabase.GUIDToAssetPath(AssetHandle.Guid));
//menu.AddItem("Print Guid", false, () => UDebug.Log(AssetHandle.Guid, AssetHandle.Asset));
//menu.AddItem("Print Path", false, () => UDebug.Log(AssetDatabase.GUIDToAssetPath(AssetHandle.Guid), AssetHandle.Asset));
menu.AddItem("Show in Folder", false, () => EditorUtility.RevealInFinder(AssetDatabase.GUIDToAssetPath(AssetHandle.Guid)));
menu.AddItem("Remove", false, () => OnWantsToRemoveAssetItem?.Invoke(AssetHandle));
menu.DropDown(new Rect(this.LocalToWorld(mousePosition), Vector2.zero), this);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.greenbamboogames.assetquickaccess",
"version": "2.1.2",
"version": "2.1.3",
"displayName": "Asset Quick Access!",
"description": "Asset quick access tool.",
"unity": "2021.3",
Expand Down

0 comments on commit c29fcca

Please sign in to comment.