Files
Temp.BattleRoyale.Map.Unity/Assets/HPA/Scripts/TsToolsA/AllAssets/MenuCommandAllAssets.cs
CortexCore a379dc5cd3 1
2024-05-13 01:28:33 +08:00

48 lines
1.5 KiB
C#

#if (UNITY_EDITOR)
using UnityEngine;
using UnityEditor;
namespace TSHP.All
{
public class MenuCommandAllAssets : MonoBehaviour
{
[MenuItem("Tools/Shortcuts/Command/Focus on Scene view U Command _u")]
static void FocusCommandWhenKeyUIsPressed()
{
#region
if (Selection.activeGameObject && Selection.activeGameObject.GetComponent<TSHP.All.FocusTagCommandAllAssets>())
{
SceneView.lastActiveSceneView.Focus();
Tools.current = Tool.Move;
}
#endregion
}
[MenuItem("Tools/Shortcuts/Command/Focus on Scene view N Command _n")]
static void FocusCommandWhenKeyNIsPressed()
{
#region
if (Selection.activeGameObject && Selection.activeGameObject.GetComponent<TSHP.All.FocusTagCommandAllAssets>())
{
SceneView.lastActiveSceneView.Focus();
Tools.current = Tool.Move;
}
#endregion
}
[MenuItem("Tools/Shortcuts/Command/Focus on Scene view Shift+S Command _#s")]
static void FocusCommandWhenKeyShiftSIsPressed()
{
#region
if (Selection.activeGameObject && Selection.activeGameObject.GetComponent<TSHP.All.FocusTagCommandAllAssets>())
{
SceneView.lastActiveSceneView.Focus();
Tools.current = Tool.Move;
}
#endregion
}
}
}
#endif