mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-09 12:16:53 +08:00
[unity] Minor editor fixes.
This commit is contained in:
parent
b0f178b68d
commit
1a6c2b8d9f
@ -237,8 +237,8 @@ namespace Spine.Unity.Editor {
|
|||||||
|
|
||||||
using (new SpineInspectorUtility.LabelWidthScope()) {
|
using (new SpineInspectorUtility.LabelWidthScope()) {
|
||||||
// Optimization options
|
// Optimization options
|
||||||
EditorGUILayout.PropertyField(meshes, MeshesLabel);
|
if (meshes != null) EditorGUILayout.PropertyField(meshes, MeshesLabel);
|
||||||
EditorGUILayout.PropertyField(immutableTriangles, ImmubleTrianglesLabel);
|
if (immutableTriangles != null) EditorGUILayout.PropertyField(immutableTriangles, ImmubleTrianglesLabel);
|
||||||
EditorGUILayout.PropertyField(tintBlack, TintBlackLabel);
|
EditorGUILayout.PropertyField(tintBlack, TintBlackLabel);
|
||||||
EditorGUILayout.PropertyField(clearStateOnDisable, ClearStateOnDisableLabel);
|
EditorGUILayout.PropertyField(clearStateOnDisable, ClearStateOnDisableLabel);
|
||||||
EditorGUILayout.Space();
|
EditorGUILayout.Space();
|
||||||
@ -255,7 +255,7 @@ namespace Spine.Unity.Editor {
|
|||||||
|
|
||||||
using (new SpineInspectorUtility.LabelWidthScope()) {
|
using (new SpineInspectorUtility.LabelWidthScope()) {
|
||||||
EditorGUILayout.LabelField("Vertex Data", EditorStyles.boldLabel);
|
EditorGUILayout.LabelField("Vertex Data", EditorStyles.boldLabel);
|
||||||
EditorGUILayout.PropertyField(pmaVertexColors, PMAVertexColorsLabel);
|
if (pmaVertexColors != null) EditorGUILayout.PropertyField(pmaVertexColors, PMAVertexColorsLabel);
|
||||||
|
|
||||||
// Optional fields. May be disabled in SkeletonRenderer.
|
// Optional fields. May be disabled in SkeletonRenderer.
|
||||||
if (normals != null) EditorGUILayout.PropertyField(normals, NormalsLabel);
|
if (normals != null) EditorGUILayout.PropertyField(normals, NormalsLabel);
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#pragma warning disable 0219
|
#pragma warning disable 0219
|
||||||
|
|
||||||
// Contributed by: Mitch Thompson
|
// Original contribution by: Mitch Thompson
|
||||||
|
|
||||||
#define SPINE_SKELETONANIMATOR
|
#define SPINE_SKELETONANIMATOR
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@ -713,7 +713,8 @@ namespace Spine.Unity.Editor {
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Match SkeletonData with Atlases
|
#region Match SkeletonData with Atlases
|
||||||
static readonly AttachmentType[] NonAtlasTypes = { AttachmentType.Boundingbox, AttachmentType.Path };
|
//static readonly AttachmentType[] NonAtlasTypes = { AttachmentType.Boundingbox, AttachmentType.Path };
|
||||||
|
static readonly AttachmentType[] AtlasTypes = { AttachmentType.Region, AttachmentType.Linkedmesh, AttachmentType.Mesh };
|
||||||
|
|
||||||
static List<AtlasAsset> MultiAtlasDialog (List<string> requiredPaths, string initialDirectory, string filename = "") {
|
static List<AtlasAsset> MultiAtlasDialog (List<string> requiredPaths, string initialDirectory, string filename = "") {
|
||||||
List<AtlasAsset> atlasAssets = new List<AtlasAsset>();
|
List<AtlasAsset> atlasAssets = new List<AtlasAsset>();
|
||||||
@ -851,7 +852,7 @@ namespace Spine.Unity.Editor {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NonAtlasTypes.Contains(attachmentType))
|
if (!AtlasTypes.Contains(attachmentType))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1304,7 +1305,7 @@ namespace Spine.Unity.Editor {
|
|||||||
|
|
||||||
if (!tintBlack) {
|
if (!tintBlack) {
|
||||||
foreach (Material m in atlasAsset.materials) {
|
foreach (Material m in atlasAsset.materials) {
|
||||||
if (m.shader.name.Contains(PMAShaderQuery)) {
|
if (m.shader.name.Contains(TintBlackShaderQuery)) {
|
||||||
tintBlack = true;
|
tintBlack = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user