mirror of
https://github.com/maxartz15/ScriptableData.git
synced 2024-11-22 14:25:34 +01:00
Compare commits
No commits in common. "310c45cb98deb140d0a837e75f3ef2bcd5d427e9" and "f00c7d43aa1af0b31cbcbe132ac4742a7ced0888" have entirely different histories.
310c45cb98
...
f00c7d43aa
@ -1,6 +1,4 @@
|
|||||||
# Change Log:
|
# Change Log:
|
||||||
## 1.1.3
|
|
||||||
- Update ExtendedScriptableObjectDrawer.
|
|
||||||
## 1.1.2
|
## 1.1.2
|
||||||
- Fixed private fields in ScriptableObject getting serialized.
|
- Fixed private fields in ScriptableObject getting serialized.
|
||||||
## 1.1.1
|
## 1.1.1
|
||||||
|
@ -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));
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "com.vertexcolor.scriptabledata",
|
"name": "com.vertexcolor.scriptabledata",
|
||||||
"displayName": "ScriptableData",
|
"displayName": "ScriptableData",
|
||||||
"version": "1.1.3",
|
"version": "1.1.2",
|
||||||
"unity": "2019.1",
|
"unity": "2019.1",
|
||||||
"description": "ScriptableData code base for ScriptableObject workflow.",
|
"description": "ScriptableData code base for ScriptableObject workflow.",
|
||||||
"category": "Tool",
|
"category": "Tool",
|
||||||
|
Loading…
Reference in New Issue
Block a user