private void Start() { foreach (SceneDataSO sceneDataSo in sceneDatas) { SceneListElement newSceneListElement = Instantiate(sceneListElementPrefab, sceneListElementsParent); newSceneListElement.Initialize(sceneDataSo); } sceneInfo.Display(sceneDatas.First()); SceneListElement.Clicked += SceneListElementOnClicked; sceneInfo.RunButtonClicked += SceneInfoOnRunButtonClicked; Loaded?.Invoke(this); #if UNITY_WEBGL exitButton.gameObject.SetActive(false); #else exitButton.gameObject.SetActive(true); exitButton.onClick.AddListener(Application.Quit); #endif }
private void SceneListElementOnClicked(SceneListElement caller) => sceneInfo.Display(caller.Data);