Example #1
0
        public void LoadSettings()
        {
            IsHuaweiARRequired = true;

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