mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-22 02:06:03 +08:00
[unity] Minor: arranged SkeletonRenderer and SkeletonGraphic subclass-only properties properly.
This commit is contained in:
parent
a2b83f338d
commit
d04d14ffe8
@ -216,9 +216,7 @@ namespace Spine.Unity.Editor {
|
||||
protected virtual void VertexDataProperties () { }
|
||||
protected virtual void AfterAdvancedPropertyFields () { }
|
||||
|
||||
protected virtual void AdvancedPropertyFields () {
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.LabelField("Renderer Settings", EditorStyles.boldLabel);
|
||||
protected virtual void RendererProperties () {
|
||||
using (new SpineInspectorUtility.LabelWidthScope()) {
|
||||
// Optimization options
|
||||
if (updateWhenInvisible != null) EditorGUILayout.PropertyField(updateWhenInvisible, UpdateWhenInvisibleLabel);
|
||||
@ -243,6 +241,24 @@ namespace Spine.Unity.Editor {
|
||||
const float MinZSpacing = -0.1f;
|
||||
const float MaxZSpacing = 0f;
|
||||
EditorGUILayout.Slider(zSpacing, MinZSpacing, MaxZSpacing, ZSpacingLabel);
|
||||
}
|
||||
|
||||
protected virtual void PhysicsProperties () {
|
||||
using (new GUILayout.HorizontalScope()) {
|
||||
EditorGUILayout.LabelField(PhysicsPositionInheritanceFactorLabel, GUILayout.Width(EditorGUIUtility.labelWidth));
|
||||
int savedIndentLevel = EditorGUI.indentLevel;
|
||||
EditorGUI.indentLevel = 0;
|
||||
EditorGUILayout.PropertyField(physicsPositionInheritanceFactor, GUIContent.none, GUILayout.MinWidth(60));
|
||||
EditorGUI.indentLevel = savedIndentLevel;
|
||||
}
|
||||
EditorGUILayout.PropertyField(physicsRotationInheritanceFactor, PhysicsRotationInheritanceFactorLabel);
|
||||
EditorGUILayout.PropertyField(physicsMovementRelativeTo, PhysicsMovementRelativeToLabel);
|
||||
}
|
||||
|
||||
protected virtual void AdvancedPropertyFields () {
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.LabelField("Renderer Settings", EditorStyles.boldLabel);
|
||||
RendererProperties();
|
||||
EditorGUILayout.Space();
|
||||
|
||||
if (threadedMeshGeneration != null) {
|
||||
@ -259,16 +275,8 @@ namespace Spine.Unity.Editor {
|
||||
EditorGUILayout.Space();
|
||||
using (new SpineInspectorUtility.LabelWidthScope()) {
|
||||
EditorGUILayout.LabelField(SpineInspectorUtility.TempContent("Physics Inheritance", SpineEditorUtilities.Icons.constraintPhysics), EditorStyles.boldLabel);
|
||||
PhysicsProperties();
|
||||
|
||||
using (new GUILayout.HorizontalScope()) {
|
||||
EditorGUILayout.LabelField(PhysicsPositionInheritanceFactorLabel, GUILayout.Width(EditorGUIUtility.labelWidth));
|
||||
int savedIndentLevel = EditorGUI.indentLevel;
|
||||
EditorGUI.indentLevel = 0;
|
||||
EditorGUILayout.PropertyField(physicsPositionInheritanceFactor, GUIContent.none, GUILayout.MinWidth(60));
|
||||
EditorGUI.indentLevel = savedIndentLevel;
|
||||
}
|
||||
EditorGUILayout.PropertyField(physicsRotationInheritanceFactor, PhysicsRotationInheritanceFactorLabel);
|
||||
EditorGUILayout.PropertyField(physicsMovementRelativeTo, PhysicsMovementRelativeToLabel);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -218,7 +218,7 @@ namespace Spine.Unity.Editor {
|
||||
EditorGUILayout.PropertyField(immutableTriangles, ImmutableTrianglesLabel);
|
||||
}
|
||||
|
||||
protected override void AdvancedPropertyFields () {
|
||||
protected override void RendererProperties () {
|
||||
|
||||
bool isSingleRendererOnly = (!allowMultipleCanvasRenderers.hasMultipleDifferentValues && allowMultipleCanvasRenderers.boolValue == false);
|
||||
bool isSeparationEnabledButNotMultipleRenderers =
|
||||
@ -229,11 +229,9 @@ namespace Spine.Unity.Editor {
|
||||
if (isSeparationEnabledButNotMultipleRenderers || meshRendersIncorrectlyWithSingleRenderer)
|
||||
advancedFoldout = true;
|
||||
|
||||
base.AdvancedPropertyFields();
|
||||
base.RendererProperties();
|
||||
|
||||
if (advancedFoldout) {
|
||||
EditorGUILayout.Space();
|
||||
using (new SpineInspectorUtility.IndentScope()) {
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.PropertyField(allowMultipleCanvasRenderers, allowMultipleCanvasRenderersLabel);
|
||||
|
||||
@ -300,8 +298,6 @@ namespace Spine.Unity.Editor {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void AfterAdvancedPropertyFields () {
|
||||
|
||||
|
||||
@ -107,8 +107,8 @@ namespace Spine.Unity.Editor {
|
||||
EditorGUILayout.PropertyField(calculateTangents, CalculateTangentsLabel);
|
||||
}
|
||||
|
||||
protected override void AdvancedPropertyFields () {
|
||||
base.AdvancedPropertyFields();
|
||||
protected override void RendererProperties () {
|
||||
base.RendererProperties();
|
||||
|
||||
if (singleSubmesh != null) EditorGUILayout.PropertyField(singleSubmesh, SingleSubmeshLabel);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user