internal void OnLoadData(ISerializableData serializableDataManager) { var data = serializableDataManager.LoadData(DataID); if (data == null || data.Length == 0) { return; } var binaryFormatter = new BinaryFormatter(); using (var memoryStream = new MemoryStream(data)) { try { MixID = binaryFormatter.Deserialize(memoryStream) as string; } catch (Exception exception) { Debug.LogError(exception); } } if (MixID == null) { return; } ThemeMix mix = SerializationService.Instance.GetMix(MixID); if (mix != null && !mix.ThemesMissing() && mix.Load()) { CurrentMix = mix; } }
internal void LoadMix(ThemeMix mix) { CurrentMix = mix; MixID = mix.ID; CurrentMix.Load(); }