initial
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 12db35c4446e48e4ea8283c7e75fc482, type: 3}
|
||||
m_Name: ApplyCustomThemeHelper
|
||||
m_EditorClassIdentifier:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1d9499e6fe8316043af4f0e8fe995074
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 12db35c4446e48e4ea8283c7e75fc482
|
||||
Reference in New Issue
Block a user