private static UMAABMSettingsStore GetThisSettings()
 {
     thisSettings = GetEncryptionSettings();
     if (thisSettings == null)
     {
         thisSettings = new UMAABMSettingsStore();
     }
     return(thisSettings);
 }
        /// <summary>
        /// Should the bundles be built for use with iOS app slicing
        /// </summary>
        public static void SetBuildForSlicing(bool enabled)
        {
            var thisSettings = GetEncryptionSettings();

            if (thisSettings == null)
            {
                thisSettings = new UMAABMSettingsStore();
            }
            thisSettings.buildForAppSlicing = enabled;
        }
        public static void ClearEncryptionSettings()
        {
            var thisSettings = GetEncryptionSettings();
            var newSettings  = new UMAABMSettingsStore();

            newSettings.buildForAppSlicing          = thisSettings.buildForAppSlicing;
            newSettings.bundleIndexCustomValue      = thisSettings.bundleIndexCustomValue;
            newSettings.bundleIndexVersioningMethod = thisSettings.bundleIndexVersioningMethod;
            newSettings.enableBundleIndexVersioning = thisSettings.enableBundleIndexVersioning;
            File.WriteAllText(Path.Combine(GetSettingsFolderPath(), SETTINGS_FILENAME), JsonUtility.ToJson(newSettings));
        }
        /// <summary>
        /// Turns encryption OFF ands unsets any existing password
        /// </summary>
        public static void UnsetEncryptionPassword()
        {
            var thisSettings = GetEncryptionSettings();

            if (thisSettings == null)
            {
                thisSettings = new UMAABMSettingsStore();
            }
            thisSettings.encryptionEnabled  = false;
            thisSettings.encryptionPassword = "";
            File.WriteAllText(Path.Combine(GetSettingsFolderPath(), SETTINGS_FILENAME), JsonUtility.ToJson(thisSettings));
            AssetDatabase.Refresh();
        }
        public static void SetEncryptionSettings(bool encryptionEnabled, string encryptionPassword = "", string encryptionSuffix = "", bool?encodeNames = null)
        {
            var thisSettings = GetEncryptionSettings();

            if (thisSettings == null)
            {
                thisSettings = new UMAABMSettingsStore();
            }
            thisSettings.encryptionEnabled  = encryptionEnabled;
            thisSettings.encryptionPassword = encryptionPassword != "" ? encryptionPassword : thisSettings.encryptionPassword;
            thisSettings.encryptionSuffix   = encryptionSuffix != "" ? encryptionSuffix : thisSettings.encryptionSuffix;
            thisSettings.encodeNames        = encodeNames != null ? (bool)encodeNames : thisSettings.encodeNames;
            File.WriteAllText(Path.Combine(GetSettingsFolderPath(), SETTINGS_FILENAME), JsonUtility.ToJson(thisSettings));
            AssetDatabase.Refresh();
        }
Exemplo n.º 6
0
        public static void SetEncryptionSettings(bool encryptionEnabled, string encryptionPassword = "", string encryptionSuffix = "", bool?encodeNames = null)
        {
            var thisSettings = GetEncryptionSettings();

            if (thisSettings == null)
            {
                thisSettings = new UMAABMSettingsStore();
            }
            thisSettings.encryptionEnabled  = encryptionEnabled;
            thisSettings.encryptionPassword = encryptionPassword != "" ? encryptionPassword : thisSettings.encryptionPassword;
            thisSettings.encryptionSuffix   = encryptionSuffix != "" ? encryptionSuffix : thisSettings.encryptionSuffix;
            thisSettings.encodeNames        = encodeNames != null ? (bool)encodeNames : thisSettings.encodeNames;
            File.WriteAllText(Path.Combine(GetSettingsFolderPath(), SETTINGS_FILENAME), JsonUtility.ToJson(thisSettings));
            //need to make this show right in Unity when its inspected

            /*TextAsset textAsset = (TextAsset)AssetDatabase.LoadAssetAtPath(Path.Combine(GetSettingsFolderPath(), SETTINGS_FILENAME), typeof(TextAsset));
             * EditorUtility.SetDirty(textAsset);
             * AssetDatabase.SaveAssets();*/
            AssetDatabase.Refresh();
            //AssetDatabase.ImportAsset(Path.Combine(GetSettingsFolderPath(), SETTINGS_FILENAME), typeof(TextAsset));
        }
Exemplo n.º 7
0
        public static void ClearEncryptionSettings()
        {
            var thisSettings = new UMAABMSettingsStore();

            File.WriteAllText(Path.Combine(GetSettingsFolderPath(), SETTINGS_FILENAME), JsonUtility.ToJson(thisSettings));
        }