Skip to content

Instantly share code, notes, and snippets.

@RodGreen
RodGreen / SwitchShortcutsProfileOnPlay.cs
Created September 12, 2019 21:54
Automatically switches editor shortcut profile when playing Unity3D
using UnityEngine;
using UnityEditor;
using UnityEditor.ShortcutManagement;
using System.Linq;
[InitializeOnLoad]
public class SwitchShortcutsProfileOnPlay
{
private const string PlayingProfileId = "Playing";
private static string _activeProfileId;