public void Init(CustomizerAvatarController customizerAvatarController, Texture2D[] defaultSwatchTextures, string categoryToSelect) { itemCustomizationModel = new DItemCustomization(); itemCustomizationModel.SetDefaultTextures(defaultSwatchTextures); ClothingDesignerOutliner component = customizerAvatarController.GetComponent <ClothingDesignerOutliner>(); propertyCustomizationController.SetOutliner(component); mainModel = new CustomizerModel(itemCustomizationModel); propertyCustomizationController.SetModel(mainModel); customizerAvatarController.SetModel(mainModel); templateSelectionController.SetModel(itemCustomizationModel); templateChosenController.SetModel(itemCustomizationModel); if (mode == CustomizerMode.CLOTHING) { equipmentCustomizationController.SetDependancies(templateSelectionController, templateChosenController, propertyCustomizationController, mainModel); EventBus.DispatchEvent(new CustomizerActiveSwatchEvents.SetIsFabric(isFabric: true)); (templateSelectionController as ClothingTemplateSelectionController).Init(categoryToSelect); } else if (mode == CustomizerMode.FURNITURE) { equipmentCustomizationController.SetDependancies(templateSelectionController, templateChosenController, propertyCustomizationController, mainModel); } equipmentCustomizationController.Init(); Service.Get <ICPSwrveService>().StartTimer("designer_time", "my_style.designer"); }
private void setupCustomization() { CustomizationContext.EventBus.DispatchEvent(default(CustomizerWidgetEvents.ShowCoinCountWidget)); CustomizerAvatarController componentInChildren = dependencies.CustomizerAvatarPreview.GetComponentInChildren <CustomizerAvatarController>(); CustomizationContext component = currentLoadedScreen.GetComponent <CustomizationContext>(); component.Init(componentInChildren, dependencies.DefaultChannelTextures, currentInventoryCategory); }