AcManager.Controls.UserPresetsControl.LoadSerializedPreset C# (CSharp) Method

LoadSerializedPreset() public static method

public static LoadSerializedPreset ( [ key, [ serialized ) : bool
key [
serialized [
return bool
        public static bool LoadSerializedPreset([NotNull] string key, [NotNull] string serialized) {
            ValuesStorage.Remove("__userpresets_p_" + key);
            ValuesStorage.Set("__userpresets_c_" + key, false);

            var c = GetInstance(key);
            if (c == null) return false;

            c.CurrentUserPreset = null;
            c.UserPresetable?.ImportFromPresetData(serialized);
            return true;
        }