public void SetUp() { const string sectionPrefabPath = "Assets/Scripts/MainScripts/DCL/Controllers/HUD/BuilderProjectsPanel/Prefabs/SectionScenesView.prefab"; var sectionPrefab = AssetDatabase.LoadAssetAtPath <GameObject>(sectionPrefabPath); const string sceneCardPrefabPath = "Assets/Scripts/MainScripts/DCL/Controllers/HUD/BuilderProjectsPanel/Prefabs/SceneCardView.prefab"; var sceneCardPrefab = AssetDatabase.LoadAssetAtPath <SceneCardView>(sceneCardPrefabPath); sectionController = new SectionScenesController(); scenesController = new ScenesViewController(sceneCardPrefab); IDeployedSceneListener deployedSceneListener = sectionController; IProjectSceneListener projectSceneListener = sectionController; scenesController.OnDeployedSceneAdded += deployedSceneListener.OnSceneAdded; scenesController.OnDeployedSceneRemoved += deployedSceneListener.OnSceneRemoved; scenesController.OnDeployedScenesSet += deployedSceneListener.OnSetScenes; scenesController.OnProjectSceneAdded += projectSceneListener.OnSceneAdded; scenesController.OnProjectSceneRemoved += projectSceneListener.OnSceneRemoved; scenesController.OnProjectScenesSet += projectSceneListener.OnSetScenes; deployedSceneListener.OnSetScenes(scenesController.deployedScenes); projectSceneListener.OnSetScenes(scenesController.projectScenes); }
void Awake() { ScenesViewController scenesViewController = gameObject.GetComponent <ScenesViewController>(); scenesViewController.dataSource = DataSource; scenesViewController.enabled = true; }
void Awake() { tableComp = table.GetComponent <UITable>(); scenesViewController = gameObject.GetComponent <ScenesViewController>(); scenesViewController.dataSource = DataSource; itemViewList = new List <SceneTypeItemView>(); picIdList = new List <string>(); assetIdList = new List <int>(); }
public void SetUp() { const string prefabAssetPath = "Assets/Scripts/MainScripts/DCL/Controllers/HUD/BuilderProjectsPanel/Prefabs/SceneCardView.prefab"; var prefab = AssetDatabase.LoadAssetAtPath <SceneCardView>(prefabAssetPath); scenesViewController = new ScenesViewController(prefab); listenerMock = new Listener_Mock(); scenesViewController.OnDeployedSceneRemoved += ((IDeployedSceneListener)listenerMock).OnSceneRemoved; scenesViewController.OnDeployedSceneAdded += ((IDeployedSceneListener)listenerMock).OnSceneAdded; scenesViewController.OnDeployedScenesSet += ((IDeployedSceneListener)listenerMock).OnSetScenes; scenesViewController.OnProjectSceneRemoved += ((IProjectSceneListener)listenerMock).OnSceneRemoved; scenesViewController.OnProjectSceneAdded += ((IProjectSceneListener)listenerMock).OnSceneAdded; scenesViewController.OnProjectScenesSet += ((IProjectSceneListener)listenerMock).OnSetScenes; }