浏览代码

Fixed JIT compilation on PS4/Mono

/main
Thomas 7 年前
当前提交
d07d061c
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 9
      ScriptableRenderPipeline/Core/CoreRP/Debugging/DebugUI.Fields.cs

9
ScriptableRenderPipeline/Core/CoreRP/Debugging/DebugUI.Fields.cs


set
{
enumNames = Enum.GetNames(value).Select(x => new GUIContent(x)).ToArray();
enumValues = Enum.GetValues(value).Cast<int>().ToArray();
// Linq.Cast<T> on a typeless Array breaks the JIT on PS4/Mono so we have to do it manually
//enumValues = Enum.GetValues(value).Cast<int>().ToArray();
var values = Enum.GetValues(value);
enumValues = new int[values.Length];
for (int i = 0; i < values.Length; i++)
enumValues[i] = (int)values.GetValue(i);
}
}
}

正在加载...
取消
保存