public void SetUp() { BIWCatalogManager.Init(); sceneCatalogController = new SceneCatalogController(); sceneCatalogController.Initialize( Substitute.For <ISceneCatalogView>(), Substitute.For <IQuickBarController>()); biwSearchBarController = sceneCatalogController.biwSearchBarController; gameObjectToUse = new GameObject("_TestObject"); gameObjectToUse.AddComponent <AssetCatalogBridge>(); }
public void Initialize(ISceneCatalogView sceneCatalogView, IQuickBarController quickBarController) { this.sceneCatalogView = sceneCatalogView; this.quickBarController = quickBarController; favoritesController = new FavoritesController(sceneCatalogView.catalogGroupList); biwSearchBarController = new BIWSearchBarController(); biwSearchBarController.Initialize(sceneCatalogView); sceneCatalogView.OnHideCatalogClicked += HideCatalogClicked; if (sceneCatalogView.catalogAssetPackList != null) { sceneCatalogView.catalogAssetPackList.OnCatalogPackClick += OnCatalogItemPackSelected; } if (sceneCatalogView.catalogGroupList != null) { sceneCatalogView.catalogGroupList.OnCatalogItemClicked += CatalogItemSelected; sceneCatalogView.catalogGroupList.OnResumeInput += ResumeInput; sceneCatalogView.catalogGroupList.OnStopInput += StopInput; sceneCatalogView.catalogGroupList.OnPointerEnterInAdapter += OnPointerEnter; sceneCatalogView.catalogGroupList.OnPointerExitInAdapter += OnPointerExit; } if (sceneCatalogView.category != null) { sceneCatalogView.category.onValueChanged.AddListener(CategoryFilter); } if (sceneCatalogView.favorites != null) { sceneCatalogView.favorites.onValueChanged.AddListener(FavoritesFilter); } if (sceneCatalogView.assetPack != null) { sceneCatalogView.assetPack.onValueChanged.AddListener(AssetsPackFilter); } sceneCatalogView.OnSceneCatalogBack += SceneCatalogBack; quickBarController.OnQuickBarShortcutSelected += QuickBarInput; quickBarController.OnCatalogItemSelected += CatalogItemSelected; biwSearchBarController.OnFilterChange += AssetsFiltered; biwSearchBarController.OnFilterRemove += FilterRemoved; }