This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using System.Linq; | |
#if UNITY_EDITOR | |
using Sirenix.OdinInspector.Editor; | |
using UnityEditor; | |
using Sirenix.Utilities; | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class StylableColorDrawer : OdinValueDrawer<StylableColor> | |
{ | |
private int colorFieldWidth = 30; | |
protected override void DrawPropertyLayout(GUIContent label) | |
{ | |
Rect rect = EditorGUILayout.GetControlRect(); | |
StylableColor value = this.ValueEntry.SmartValue; | |
var styles = value.styles; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class StyledMaterials : ScriptableObject | |
{ | |
[SerializeField] | |
private Styles styles; | |
} |