This commit is contained in:
2026-06-22 22:57:36 +09:30
parent 68eeef2cff
commit 4b54e57694
683 changed files with 133112 additions and 0 deletions
@@ -0,0 +1,27 @@
using System.Collections;
using UnityEngine;
#if UNITY_EDITOR
using Unity.EditorCoroutines.Editor;
using UnityEditor;
using Unity.Tutorials.Core.Editor;
#endif
[CreateAssetMenu(fileName = "ApplyCustomThemeHelper", menuName = "Scriptable Objects/ApplyCustomThemeHelper")]
public class ApplyCustomThemeHelper : ScriptableObject
{
#if UNITY_EDITOR
public void ApplyCustomTheme()
{
EditorCoroutineUtility.StartCoroutineOwnerless(WaitToApply());
}
IEnumerator WaitToApply()
{
yield return null;
TutorialWindow.Instance.rootVisualElement.styleSheets.Add(EditorGUIUtility.isProSkin ?
TutorialProjectSettings.Instance.TutorialStyle.DarkThemeStyleSheet :
TutorialProjectSettings.Instance.TutorialStyle.LightThemeStyleSheet);
}
#endif
}