From efb164bdc89471374dd732e019d9314d17759ba0 Mon Sep 17 00:00:00 2001 From: katboi01 <59540382+katboi01@users.noreply.github.com> Date: Fri, 3 Mar 2023 18:27:19 +0100 Subject: [PATCH] Framerate limit So as not to melt your GPU --- Assets/Scenes/Version2.unity | 39 +++++++++++++++++---------------- Assets/Scripts/UmaViewerMain.cs | 2 +- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/Assets/Scenes/Version2.unity b/Assets/Scenes/Version2.unity index 02adf2f..a7a0141 100644 --- a/Assets/Scenes/Version2.unity +++ b/Assets/Scenes/Version2.unity @@ -36244,7 +36244,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1564959564} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.06471976, y: 0.8310537, z: -2.8179564} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -36334,6 +36334,7 @@ MonoBehaviour: VMDButton: {fileID: 668484488} UpdateDBButton: {fileID: 1516377151} WorkModeDropdown: {fileID: 1909384047} + LanguageDropdown: {fileID: 308207822} TogglablePanels: - {fileID: 1974252710} - {fileID: 87578738} @@ -51965,9 +51966,9 @@ RectTransform: m_Father: {fileID: 6878219667498913896} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 106.5, y: -286} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 180, y: 20} m_Pivot: {x: 0.5, y: 1} --- !u!114 &6878219665895574065 @@ -52473,9 +52474,9 @@ RectTransform: m_Father: {fileID: 6878219667498913896} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 106.5, y: -57.2} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 180, y: 20} m_Pivot: {x: 0.5, y: 1} --- !u!114 &6878219666109573094 @@ -54830,9 +54831,9 @@ RectTransform: m_Father: {fileID: 6878219667498913896} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 106.5, y: -171.6} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 180, y: 20} m_Pivot: {x: 0.5, y: 1} --- !u!114 &6878219666841734894 @@ -55661,9 +55662,9 @@ RectTransform: m_Father: {fileID: 6878219667498913896} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 106.5, y: -228.8} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 180, y: 20} m_Pivot: {x: 0.5, y: 1} --- !u!114 &6878219667203546886 @@ -57373,9 +57374,9 @@ RectTransform: m_Father: {fileID: 6878219667498913896} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 106.5, y: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 180, y: 20} m_Pivot: {x: 0.5, y: 1} --- !u!114 &6878219667749320559 @@ -57593,9 +57594,9 @@ RectTransform: m_Father: {fileID: 6878219667498913896} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 106.5, y: -114.4} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 180, y: 20} m_Pivot: {x: 0.5, y: 1} --- !u!1 &6878219667784581358 diff --git a/Assets/Scripts/UmaViewerMain.cs b/Assets/Scripts/UmaViewerMain.cs index b2d0f16..ad267c7 100644 --- a/Assets/Scripts/UmaViewerMain.cs +++ b/Assets/Scripts/UmaViewerMain.cs @@ -34,7 +34,7 @@ public class UmaViewerMain : MonoBehaviour { Instance = this; new Config(); - Application.targetFrameRate = -1; + Application.targetFrameRate = 120; AbList = UmaDatabaseController.Instance.MetaEntries.ToList(); AbChara = AbList.Where(ab => ab.Name.StartsWith(UmaDatabaseController.CharaPath)).ToList(); AbMotions = AbList.Where(ab => ab.Name.StartsWith(UmaDatabaseController.MotionPath)).ToList();