Compare commits

..

No commits in common. "master" and "1.1.1" have entirely different histories.

4 changed files with 14 additions and 19 deletions

View File

@ -1,8 +1,4 @@
# Change Log: # Change Log:
## 1.1.3
- Update ExtendedScriptableObjectDrawer.
## 1.1.2
- Fixed private fields in ScriptableObject getting serialized.
## 1.1.1 ## 1.1.1
- Instance indicator colors. - Instance indicator colors.
- Code refactor. - Code refactor.

View File

@ -16,8 +16,7 @@ namespace ScriptableData.Editor
{ {
// Permamently exclude classes from being affected by the drawer. // Permamently exclude classes from being affected by the drawer.
private static readonly string[] ignoredFullClassNames = new string[] { "TMPro.TMP_FontAsset" }; private static readonly string[] ignoredFullClassNames = new string[] { "TMPro.TMP_FontAsset" };
private static readonly GUIContent buttonContent = EditorGUIUtility.IconContent("d_ScriptableObject On Icon"); private const int buttonWidth = 20;
private const int buttonWidth = 16;
public override float GetPropertyHeight(SerializedProperty property, GUIContent label) public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
{ {
@ -107,7 +106,7 @@ namespace ScriptableData.Editor
propertyRect.width -= buttonWidth; propertyRect.width -= buttonWidth;
// Draw create button. // Draw create button.
Rect buttonRect = new Rect(position.x + position.width - buttonWidth, position.y + 1, buttonWidth, EditorGUIUtility.singleLineHeight); Rect buttonRect = new Rect(position.x + position.width - buttonWidth, position.y, buttonWidth, EditorGUIUtility.singleLineHeight);
DrawScriptableObjectCreateButton(buttonRect, property, fieldType); DrawScriptableObjectCreateButton(buttonRect, property, fieldType);
} }
} }
@ -127,7 +126,7 @@ namespace ScriptableData.Editor
private static void DrawScriptableObjectCreateButton(Rect position, SerializedProperty property, Type type) private static void DrawScriptableObjectCreateButton(Rect position, SerializedProperty property, Type type)
{ {
if (GUI.Button(position, buttonContent, EditorStyles.iconButton)) if (GUI.Button(position, "+"))
{ {
GenericMenu typeChooser = new GenericMenu(); GenericMenu typeChooser = new GenericMenu();
IEnumerable<Type> types = type.Assembly.GetTypes().Where(t => type.IsAssignableFrom(t)); IEnumerable<Type> types = type.Assembly.GetTypes().Where(t => type.IsAssignableFrom(t));

View File

@ -7,7 +7,7 @@ namespace ScriptableData
{ {
public event Action<T0> OnValueChangedEvent; public event Action<T0> OnValueChangedEvent;
[NonSerialized] private T0 _value; private T0 _value;
public T0 Value public T0 Value
{ {
get get
@ -37,7 +37,7 @@ namespace ScriptableData
{ {
public event Action<T0, T1> OnValueChangedEvent; public event Action<T0, T1> OnValueChangedEvent;
[NonSerialized] private T0 _value; private T0 _value;
public T0 Value public T0 Value
{ {
get get
@ -51,7 +51,7 @@ namespace ScriptableData
} }
} }
[NonSerialized] private T1 _value1; private T1 _value1;
public T1 Value1 public T1 Value1
{ {
get get
@ -88,7 +88,7 @@ namespace ScriptableData
{ {
public event Action<T0, T1, T2> OnValueChangedEvent; public event Action<T0, T1, T2> OnValueChangedEvent;
[NonSerialized] private T0 _value; private T0 _value;
public T0 Value public T0 Value
{ {
get get
@ -102,7 +102,7 @@ namespace ScriptableData
} }
} }
[NonSerialized] private T1 _value1; private T1 _value1;
public T1 Value1 public T1 Value1
{ {
get get
@ -116,7 +116,7 @@ namespace ScriptableData
} }
} }
[NonSerialized] private T2 _value2; private T2 _value2;
public T2 Value2 public T2 Value2
{ {
get get
@ -161,7 +161,7 @@ namespace ScriptableData
{ {
public event Action<T0, T1, T2, T3> OnValueChangedEvent; public event Action<T0, T1, T2, T3> OnValueChangedEvent;
[NonSerialized] private T0 _value; private T0 _value;
public T0 Value public T0 Value
{ {
get get
@ -175,7 +175,7 @@ namespace ScriptableData
} }
} }
[NonSerialized] private T1 _value1; private T1 _value1;
public T1 Value1 public T1 Value1
{ {
get get
@ -189,7 +189,7 @@ namespace ScriptableData
} }
} }
[NonSerialized] private T2 _value2; private T2 _value2;
public T2 Value2 public T2 Value2
{ {
get get
@ -203,7 +203,7 @@ namespace ScriptableData
} }
} }
[NonSerialized] private T3 _value3; private T3 _value3;
public T3 Value3 public T3 Value3
{ {
get get

View File

@ -1,7 +1,7 @@
{ {
"name": "com.vertexcolor.scriptabledata", "name": "com.vertexcolor.scriptabledata",
"displayName": "ScriptableData", "displayName": "ScriptableData",
"version": "1.1.3", "version": "1.1.1",
"unity": "2019.1", "unity": "2019.1",
"description": "ScriptableData code base for ScriptableObject workflow.", "description": "ScriptableData code base for ScriptableObject workflow.",
"category": "Tool", "category": "Tool",