-
Notifications
You must be signed in to change notification settings - Fork 8
/
Config.cs
41 lines (33 loc) · 1.47 KB
/
Config.cs
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
using System;
using Swihoni.Components;
using Swihoni.Sessions.Config;
using UnityEngine;
using UnityEngine.Rendering.PostProcessing;
using Voxelfield.Session;
using Voxelfield.Session.Mode;
namespace Voxelfield
{
[CreateAssetMenu(fileName = "Config", menuName = "Session/Config", order = 0)]
public class Config : DefaultConfig
{
// private static Lazy<PostProcessVolume> _volume;
[Config(ConfigType.Session)] public VoxelMapNameProperty mapName = new("Castle");
[Config] public BoolProperty enableMiniMap = new();
[Config] public BoolProperty authenticateSteam = new();
public SecureAreaConfig secureAreaConfig = new();
public new static Config Active => (Config) DefaultConfig.Active;
// [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterAssembliesLoaded)]
// private static void PreInitialize() => _volume = new Lazy<PostProcessVolume>(FindFirstObjectByType<PostProcessVolume>);
[RuntimeInitializeOnLoadMethod]
private static void Initialize()
{
Debug.Log($"[CPU] {SystemInfo.processorType}: {SystemInfo.processorCount} cores @{SystemInfo.processorFrequency} MHz");
Debug.Log($"[GPU] {SystemInfo.graphicsDeviceName}: {SystemInfo.graphicsMemorySize} mb");
}
// protected override void SetQualityLevel(int level)
// {
// base.SetQualityLevel(level);
// _volume.Value.enabled = level > 0;
// }
}
}