| | 1 | | using UnityEngine; |
| | 2 | |
|
| | 3 | | namespace MainScripts.DCL.ScriptableObjectsDesktop |
| | 4 | | { |
| | 5 | | public class CommonScriptableObjectsDesktop |
| | 6 | | { |
| | 7 | | private static BooleanVariable disableVSyncValue; |
| 0 | 8 | | public static BooleanVariable disableVSync => GetOrLoad(ref disableVSyncValue, "ScriptableObjectsDesktop/Disable |
| | 9 | |
|
| | 10 | | private static BooleanVariable disableScreenResolutionValue; |
| 0 | 11 | | public static BooleanVariable disableScreenResolution => GetOrLoad(ref disableScreenResolutionValue, "Scriptable |
| | 12 | |
|
| | 13 | | public static T GetOrLoad<T>(ref T variable, string path) where T : Object |
| | 14 | | { |
| 0 | 15 | | if (variable == null) |
| | 16 | | { |
| 0 | 17 | | variable = Resources.Load<T>(path); |
| | 18 | | } |
| | 19 | |
|
| 0 | 20 | | return variable; |
| | 21 | | } |
| | 22 | | } |
| | 23 | | } |