public void LoadSettings() { IsHuaweiARRequired = true; if (File.Exists(c_ProjectSettingsPath)) { HuaweiARProjectSettings settings = JsonUtility.FromJson <HuaweiARProjectSettings>( File.ReadAllText(c_ProjectSettingsPath)); IsHuaweiARRequired = settings.IsHuaweiARRequired; } }
static HuaweiARProjectSettings() { if (Application.isEditor) { Instance = new HuaweiARProjectSettings(); Instance.LoadSettings(); } else { Instance = null; Debug.LogError("Cannot access HuaweiARProjectSettings outside of Unity Editor"); } }