private void Awake() { string mouthsData = Resources.Load <TextAsset>("MouthsData").text; StickerCustomizationPopupModel stickerCustomizationPopupModel = JsonUtility.FromJson <StickerCustomizationPopupModel>(mouthsData); SetViewModel(new StickerCustomizationPopupViewModel(stickerCustomizationPopupModel, new CachedResourcesLoader(), stickerCustomizationPopupModel.GetDataWithIndex(0).Id)); }
public StickerCustomizationPopupViewModel(StickerCustomizationPopupModel stickerCustomizationPopupModel, CachedResourcesLoader cachedResourcesLoader, int selectedMouthId) { selectedMouthModel = new BehaviorSubject <MouthCellModel>(stickerCustomizationPopupModel.GetDataWithIndex(selectedMouthId)); this.stickerCustomizationPopupModel = stickerCustomizationPopupModel; this.cachedResourcesLoader = cachedResourcesLoader; }