Example #1
0
 public void Initialize(SceneDataSO sceneDataSo)
 {
     Data           = sceneDataSo;
     titleText.text = sceneDataSo.Name;
     button.onClick.RemoveListener(ButtonOnClick);
     button.onClick.AddListener(ButtonOnClick);
 }
Example #2
0
        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;
            }
        }
Example #3
0
 private void SceneInfoOnRunButtonClicked(SceneInfo caller, SceneDataSO sceneData)
 {
     SceneManager.LoadScene(sceneData.Scene);
     LevelStarted?.Invoke(this, sceneData);
 }