浏览代码

Merge pull request #1006 from Unity-Technologies/debug-menu-enum-fix

Fixed runtime enums in the debug window
/main
GitHub 7 年前
当前提交
bd94f1f1
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5
      ScriptableRenderPipeline/Core/CoreRP/Debugging/Prefabs/Scripts/DebugUIHandlerEnumField.cs

5
ScriptableRenderPipeline/Core/CoreRP/Debugging/Prefabs/Scripts/DebugUIHandlerEnumField.cs


void UpdateValueLabel()
{
int index = Array.IndexOf(m_Field.enumValues, m_Field.GetValue());
// Fallback just in case, we may be handling sub/sectionned enums here
if (index < 0)
index = 0;
valueLabel.text = "< " + m_Field.enumNames[index].text + " >";
}
}
正在加载...
取消
保存