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"); }
public void SetOutliner(ClothingDesignerOutliner clothingOutliner) { this.clothingOutliner = clothingOutliner; ClothingDesignerCameraController clothingDesignerCameraController = SceneRefs.ClothingDesignerCameraController; if (clothingDesignerCameraController != null) { Camera component = clothingDesignerCameraController.GetComponent <Camera>(); if (component != null) { clothingOutliner.Init(component); } } clothingOutliner.enabled = false; }