Skip to content

Instantly share code, notes, and snippets.

@LotteMakesStuff
LotteMakesStuff / LookatTool.cs
Last active November 2, 2023 21:04
In Unity 2019.1 Unity added a new custom EditorTool API, heres some example code showing some tools we could make with it!
using UnityEditor;
using UnityEditor.EditorTools;
using UnityEngine;
[EditorTool("LookAt Tool")]
public class LookatTool : EditorTool
{
GUIContent cachedIcon;
// NOTE: as were caching this, unity will serialize it between compiles! so if we want to test out new looks,