You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CrowdControl/Assets/Feel/MMTools/Editor/MMUtilities/ManagerIconEditor.cs

26 lines
740 B
C#

2 months ago
using UnityEngine;
using UnityEditor;
using System.Collections;
namespace MoreMountains.Tools
{
/// <summary>
/// This class adds names for each LevelMapPathElement next to it on the scene view, for easier setup
/// </summary>
[CustomEditor(typeof(MMSceneViewIcon))]
[InitializeOnLoad]
public class SceneViewIconEditor : Editor
{
//protected SceneViewIcon _sceneViewIcon;
[DrawGizmo(GizmoType.InSelectionHierarchy | GizmoType.NotInSelectionHierarchy)]
static void DrawGameObjectName(MMSceneViewIcon sceneViewIcon, GizmoType gizmoType)
{
GUIStyle style = new GUIStyle();
style.normal.textColor = Color.blue;
Handles.Label(sceneViewIcon.transform.position, sceneViewIcon.gameObject.name,style);
}
}
}