【debug】优化单位信息显示
parent
a37bc83ba8
commit
faa760939e
|
|
@ -52,11 +52,18 @@ namespace FightDebug
|
|||
EditorGUILayout.HelpBox("仅支持在开战后使用", MessageType.Error);
|
||||
}
|
||||
|
||||
private void _ShowLabel(string label, string value)
|
||||
private void _ShowLabel(string label, string value, bool showCopy = false)
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Label(label, GUILayout.Width(140));
|
||||
GUILayout.Label(value);
|
||||
if (showCopy)
|
||||
{
|
||||
if (GUILayout.Button("复制", GUILayout.Width(60)))
|
||||
{
|
||||
EditorGUIUtility.systemCopyBuffer = value;
|
||||
}
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
|
|
@ -112,8 +119,10 @@ namespace FightDebug
|
|||
GUILayout.BeginVertical("box");
|
||||
_DisplayBuffIcon(buff);
|
||||
_ShowLabel("名字:", buff.configData.Name);
|
||||
_ShowLabel("BuffId:", buff.configData.ID + "");
|
||||
_ShowLabel("buff类型:", buff.configData.BuffType.ToString(), true);
|
||||
_ShowLabel("BuffId:", buff.configData.ID + "", true);
|
||||
_ShowLabel("Level:", buff.configData.Level + "");
|
||||
_ShowLabel("Creator:", buff.creator.GetDescString());
|
||||
GUILayout.EndVertical();
|
||||
}
|
||||
private void _DisplayBuffIcon(BaseBuff buff)
|
||||
|
|
@ -261,15 +270,15 @@ namespace FightDebug
|
|||
private void _ShowInFight()
|
||||
{
|
||||
var unit = _targetUnit;
|
||||
_scrollPos1 = GUILayout.BeginScrollView(_scrollPos1, GUILayout.Width(420));
|
||||
GUILayout.BeginVertical("box",GUILayout.Width(390));
|
||||
_scrollPos1 = GUILayout.BeginScrollView(_scrollPos1);
|
||||
GUILayout.BeginVertical("box");
|
||||
|
||||
try
|
||||
{
|
||||
_ShowLabel("ID:", unit.GetID() + "");
|
||||
_ShowLabel("ID:", unit.GetID() + "", true);
|
||||
_ShowLabel("类型:", EGameUnitTypeUtils.GetStrByType(unit.gameunitType));
|
||||
_ShowLabel("名字:", unit.debugShowInfo.name);
|
||||
_ShowLabel("配置ID:", unit.debugShowInfo.configId);
|
||||
_ShowLabel("配置ID:", unit.debugShowInfo.configId, true);
|
||||
_ShowLabel("阵营ID:", unit.commonData.troopId + "");
|
||||
if (unit.commonData.troopId == ETroopsId.Enemy && unit.unitLevelData != null)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue