Fix TouchSampleRate not working issue; Prepare for new touch system

This commit is contained in:
xpeng
2023-05-12 18:03:45 +02:00
parent b4a78058f2
commit 364c9fde40
22 changed files with 9428 additions and 249 deletions
@@ -14,7 +14,8 @@ public class TouchSettingManager : MonoBehaviour
sampleDropdown.onValueChanged.AddListener((int value) => {
string fpsString = Enum.GetName(typeof(CEnum.FPS), value);
Time.fixedDeltaTime = 1 / int.Parse(fpsString.Remove(0, 3));
Time.fixedDeltaTime = 1f / Convert.ToInt32(fpsString.Remove(0, 3));
Debug.Log("Time:" + fpsString);
});
sampleDropdown.onValueChanged?.Invoke(sampleDropdown.value);