场景中挂在了Spot的物体前会显示文本
public class SceneShow : Editor
{
[DrawGizmo(GizmoType.InSelectionHierarchy | GizmoType.NotInSelectionHierarchy)]
static void ShowHexSpot(Spot spot, GizmoType gizmoType)
{
GUIStyle style = new GUIStyle();
style.normal.textColor = Color.green;
string temp = string.Format("id: {0}\nq_r: {1}", spot.spot.hexSpotInfo.id, spot.spot.hexSpotInfo.hex.getAxialPosString());
Handles.Label(spot.transform.position + Vector3.up * 0.2F, temp, style);
}
}
标签:style,场景,spot,Handles,GizmoType,文本 From: https://www.cnblogs.com/mcyushao/p/17075896.html