12 public int SceneIndex {
get;
set; }
14 public string SceneName
18 gameObject.name = value;
19 textMesh.text = value;
29 private TextMesh textMesh;
30 private Color originalTextColor;
34 textMesh = GetComponentInChildren<TextMesh>();
35 Debug.Assert(textMesh != null,
"SceneLauncherButton must contain a TextMesh.");
36 originalTextColor = textMesh.color;
44 private bool IsHighlighted
48 textMesh.color = value ? HighlightedTextColor : originalTextColor;
56 Debug.LogFormat(
"SceneLauncher: Loading scene {0}: {1}", SceneIndex, SceneManager.GetSceneAt(SceneIndex).name);
59 MenuReference.SetActive(
false);
60 SceneManager.LoadSceneAsync(SceneIndex, LoadSceneMode.Single);