MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / OnRowRightClick

Method OnRowRightClick

Source/Editor/Windows/Profiler/Assets.cs:288–306  ·  view source on GitHub ↗
(ClickableRow row)

Source from the content-addressed store, hash-verified

286 }
287
288 private void OnRowRightClick(ClickableRow row)
289 {
290 var assetId = (Guid)row.Tag;
291 var assetItem = Editor.Instance.ContentDatabase.FindAsset(assetId);
292 if (assetItem != null)
293 {
294 var cm = new ContextMenu();
295 ContextMenuButton b;
296 b = cm.AddButton("Open", () => Editor.Instance.ContentEditing.Open(assetItem));
297 cm.AddButton("Show in content window", () => Editor.Instance.Windows.ContentWin.Select(assetItem));
298 cm.AddButton(Utilities.Constants.ShowInExplorer, () => FileSystem.ShowFileExplorer(System.IO.Path.GetDirectoryName(assetItem.Path)));
299 cm.AddButton("Select actors using this asset", () => Editor.Instance.SceneEditing.SelectActorsUsingAsset(assetItem.ID));
300 cm.AddButton("Show asset references graph", () => Editor.Instance.Windows.Open(new AssetReferencesGraphWindow(Editor.Instance, assetItem)));
301 cm.AddButton("Copy name", () => Clipboard.Text = assetItem.NamePath);
302 cm.AddButton("Copy path", () => Clipboard.Text = assetItem.Path);
303 cm.AddButton("Copy asset ID", () => Clipboard.Text = JsonSerializer.GetStringID(assetItem.ID));
304 cm.Show(row, row.PointFromScreen(Input.MouseScreenPosition));
305 }
306 }
307 }
308}
309#endif

Callers

nothing calls this directly

Calls 10

GetDirectoryNameMethod · 0.80
GetStringIDMethod · 0.80
FindAssetMethod · 0.45
AddButtonMethod · 0.45
OpenMethod · 0.45
SelectMethod · 0.45
ShowFileExplorerMethod · 0.45
ShowMethod · 0.45
PointFromScreenMethod · 0.45

Tested by

no test coverage detected