Created
June 13, 2023 08:24
-
-
Save fuqunaga/df0869c0a4969fe954edc4f0ef7d814e to your computer and use it in GitHub Desktop.
PingObjectShortcut
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
using UnityEngine; | |
public static class PingObjectShortcut | |
{ | |
private const string MenuPath = "Tools/Ping/"; | |
[MenuItem(MenuPath + "MainCamera #&c")] | |
private static void PingMainCamera() | |
{ | |
var camera = GameObject.FindGameObjectWithTag("MainCamera"); | |
if (camera != null) | |
{ | |
EditorGUIUtility.PingObject(camera); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment