浏览代码

Avoid UInt warp at runtime

/main
Thomas 6 年前
当前提交
e7a59339
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5
      ScriptableRenderPipeline/Core/CoreRP/Debugging/Prefabs/Scripts/DebugUIHandlerUIntField.cs

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


using System;
using UnityEngine.UI;
namespace UnityEngine.Experimental.Rendering.UI

void ChangeValue(bool fast, int multiplier)
{
long value = m_Field.GetValue();
if (value == 0 && multiplier < 0)
return;
value += m_Field.incStep * (fast ? m_Field.intStepMult : 1) * multiplier;
m_Field.SetValue((uint)value);
UpdateValueLabel();

正在加载...
取消
保存