Skip to content

Instantly share code, notes, and snippets.

@MrMMatricks
MrMMatricks / DrawerTestObject.cs
Created July 8, 2020 08:45
DrawerTestValue.cs
using System;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;
#if UNITY_EDITOR
using Sirenix.OdinInspector.Editor;
using UnityEditor;
using Sirenix.Utilities;
#endif
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;
@MrMMatricks
MrMMatricks / StyledMaterials.cs
Created June 23, 2020 09:06
OnInspectorInit Problem
public class StyledMaterials : ScriptableObject
{
[SerializeField]
private Styles styles;
}