add live framerate setting

This commit is contained in:
CroakFang
2023-07-27 23:21:06 +08:00
parent c2a8ee3852
commit 96ae4ec620
2 changed files with 1228 additions and 10 deletions
@@ -12,6 +12,8 @@ public class LiveViewerUI : MonoBehaviour
public RectTransform BottonUITransform;
public Dropdown FrameRateDropDown;
float targetHeight = 0;
float height;
private void Awake()
@@ -45,4 +47,9 @@ public class LiveViewerUI : MonoBehaviour
{
targetHeight = -height;
}
public void SetFrameRate(int fps)
{
Application.targetFrameRate = int.Parse(FrameRateDropDown.options[fps].text);
}
}