Skip to content

Instantly share code, notes, and snippets.

@FleshMobProductions
FleshMobProductions / SelectionBackwardsForwardsNavigationMenuItem.cs
Last active May 7, 2025 17:16
Editor scripts to navigate between selections in Unity back (Ctrl + Alt + Z) and forward (Ctrl + Alt + Y). MenuItems can be found under "Edit/Selection - Navigate Back" and "Edit/Selection - Navigate Forward" and an EditorWindow can be found under "Window/Navigate Selection History". Place the scripts inside an "Editor" folder so they are exclud…
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
namespace FMPUtils.Editor
{
[InitializeOnLoad]
public static class SelectionBackwardsForwardsNavigationMenuItem
{
public static event System.Action historyOrSelectionChanged;