1
0
mirror of synced 2024-12-04 18:47:58 +01:00
WACVR/Assets/Script/Configuration/TouchSettingManager.cs
2022-10-03 02:04:54 +02:00

21 lines
524 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
using System;
public class TouchSettingManager : MonoBehaviour
{
void Start()
{
ConfigManager.onConfigChanged += ApplyConfig;
ConfigManager.EnsureInitialization();
ApplyConfig();
}
public void ApplyConfig()
{
string fpsString = Enum.GetName(typeof(Config.captureFPS), ConfigManager.config.CaptureFPS);
Time.fixedDeltaTime = 1 / int.Parse(fpsString.Remove(0, 3));
}
}