public void Initialize(SceneDataSO sceneDataSo) { Data = sceneDataSo; titleText.text = sceneDataSo.Name; button.onClick.RemoveListener(ButtonOnClick); button.onClick.AddListener(ButtonOnClick); }
public void Display(SceneDataSO sceneData) { titleText.text = sceneData.Name; descriptionText.text = sceneData.Description; screenshotImage.sprite = sceneData.Screenshot; selectedSceneToRun = sceneData; if (sceneData.isUsingComputeShaders && SystemInfo.supportsComputeShaders) { runButton.interactable = true; } else if (sceneData.isUsingComputeShaders && !SystemInfo.supportsComputeShaders) { descriptionText.text = $"{unsupportedComputeShadersMessage}\n\n{descriptionText.text}"; runButton.interactable = false; } else if (!sceneData.isUsingComputeShaders) { runButton.interactable = true; } }
private void SceneInfoOnRunButtonClicked(SceneInfo caller, SceneDataSO sceneData) { SceneManager.LoadScene(sceneData.Scene); LevelStarted?.Invoke(this, sceneData); }