1
0
mirror of synced 2024-12-13 15:01:08 +01:00
WACVR/Assets/Script/Configuration/TouchSettingManager.cs

21 lines
524 B
C#
Raw Normal View History

2022-10-03 02:04:54 +02:00
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));
}
}