[unity] Minor updates to editors.

This commit is contained in:
pharan 2018-04-20 12:05:32 +08:00
parent 69cb86eeef
commit 5766aa747d
3 changed files with 9 additions and 1 deletions

View File

@ -238,6 +238,12 @@ namespace Spine.Unity.Editor {
AssetDatabase.CreateAsset(newAsset, assetPath);
}
}
var folderObject = AssetDatabase.LoadAssetAtPath(dataPath, typeof(UnityEngine.Object));
if (folderObject != null) {
Selection.activeObject = folderObject;
EditorGUIUtility.PingObject(folderObject);
}
}
void OnInspectorGUIMulti () {

View File

@ -75,6 +75,7 @@ namespace Spine.Unity.Editor {
}
SerializedProperty dataField = property.FindBaseOrSiblingProperty(TargetAttribute.dataField);
if (dataField != null) {
var objectReferenceValue = dataField.objectReferenceValue;
if (objectReferenceValue is SkeletonDataAsset) {

View File

@ -288,7 +288,6 @@ namespace Spine.Unity.Editor {
defaultShader = shader != null ? shader.name : DEFAULT_DEFAULT_SHADER;
if (EditorGUI.EndChangeCheck())
EditorPrefs.SetString(DEFAULT_SHADER_KEY, defaultShader);
EditorGUILayout.Space();
EditorGUI.BeginChangeCheck();
setTextureImporterSettings = EditorGUILayout.Toggle(new GUIContent("Apply Atlas Texture Settings", "Apply the recommended settings for Texture Importers."), showHierarchyIcons);
@ -296,6 +295,8 @@ namespace Spine.Unity.Editor {
EditorPrefs.SetBool(SET_TEXTUREIMPORTER_SETTINGS_KEY, showHierarchyIcons);
}
EditorGUILayout.Space();
EditorGUILayout.LabelField("Editor Instantiation", EditorStyles.boldLabel);
EditorGUI.BeginChangeCheck();
defaultZSpacing = EditorGUILayout.Slider("Default Slot Z-Spacing", defaultZSpacing, -0.1f, 0f);