-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGraphicSystem.cs
More file actions
47 lines (41 loc) · 1.25 KB
/
GraphicSystem.cs
File metadata and controls
47 lines (41 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using DP.Utilities;
using Lofelt.NiceVibrations;
using Sirenix.OdinInspector;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using VTLTools;
namespace RobotGTA.System
{
public class GraphicSystem : Singleton<GraphicSystem>
{
private void OnEnable()
{
if (DeviceInfo.IsWeakDevice())
ChangeGraphicPreset(GraphicPreset.Low);
else
ChangeGraphicPreset(GraphicPreset.High);
}
public void ChangeGraphicPreset(GraphicPreset _graphicPreset)
{
//UserDataManager.CurrentGraphicPreset = _graphicPreset;
QualitySettings.SetQualityLevel((int)_graphicPreset, true);
//switch (_graphicPreset)
//{
// case GraphicPreset.High:
// Application.targetFrameRate = 60;
// break;
// case GraphicPreset.Low:
// Application.targetFrameRate = 30;
// break;
//}
DPDebug.Log("<color=yellow>Quality setting now:</color> " + _graphicPreset);
}
}
public enum GraphicPreset
{
None,
Low,
High,
}
}