mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Merge branch 'master' of https://github.com/esotericsoftware/spine-runtimes
This commit is contained in:
commit
973a078c1c
@ -8,7 +8,7 @@ public class SpineboyPole : MonoBehaviour {
|
|||||||
public SkeletonAnimation skeletonAnimation;
|
public SkeletonAnimation skeletonAnimation;
|
||||||
public SkeletonRenderSeparator separator;
|
public SkeletonRenderSeparator separator;
|
||||||
|
|
||||||
[Space]
|
[Space(18)]
|
||||||
[SpineAnimation]
|
[SpineAnimation]
|
||||||
public string run;
|
public string run;
|
||||||
[SpineAnimation]
|
[SpineAnimation]
|
||||||
|
|||||||
@ -161,6 +161,11 @@ namespace Spine.Unity {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
stateData.DefaultMix = defaultMix;
|
stateData.DefaultMix = defaultMix;
|
||||||
|
|
||||||
|
// For compatibility with runtime-instantiated SkeletonDataAsset.
|
||||||
|
if (fromAnimation == null || toAnimation == null)
|
||||||
|
return;
|
||||||
|
|
||||||
for (int i = 0, n = fromAnimation.Length; i < n; i++) {
|
for (int i = 0, n = fromAnimation.Length; i < n; i++) {
|
||||||
if (fromAnimation[i].Length == 0 || toAnimation[i].Length == 0)
|
if (fromAnimation[i].Length == 0 || toAnimation[i].Length == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@ -64,8 +64,8 @@ namespace Spine.Unity.Editor {
|
|||||||
if (skeletonRenderer.objectReferenceValue == null) {
|
if (skeletonRenderer.objectReferenceValue == null) {
|
||||||
SkeletonRenderer parentRenderer = BoneFollowerInspector.GetInParent<SkeletonRenderer>(targetBoneFollower.transform);
|
SkeletonRenderer parentRenderer = BoneFollowerInspector.GetInParent<SkeletonRenderer>(targetBoneFollower.transform);
|
||||||
if (parentRenderer != null && parentRenderer.gameObject != targetBoneFollower.gameObject) {
|
if (parentRenderer != null && parentRenderer.gameObject != targetBoneFollower.gameObject) {
|
||||||
Debug.Log("Inspector automatically assigned BoneFollower.SkeletonRenderer");
|
|
||||||
skeletonRenderer.objectReferenceValue = parentRenderer;
|
skeletonRenderer.objectReferenceValue = parentRenderer;
|
||||||
|
Debug.Log("Inspector automatically assigned BoneFollower.SkeletonRenderer");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -260,7 +260,11 @@ namespace Spine.Unity.Editor {
|
|||||||
EditorPrefs.SetFloat(DEFAULT_SCALE_KEY, defaultScale);
|
EditorPrefs.SetFloat(DEFAULT_SCALE_KEY, defaultScale);
|
||||||
|
|
||||||
EditorGUI.BeginChangeCheck();
|
EditorGUI.BeginChangeCheck();
|
||||||
defaultShader = EditorGUILayout.DelayedTextField(new GUIContent("Default shader", "Default shader for materials auto-generated on import."), defaultShader);
|
#if UNITY_5_3_OR_NEWER
|
||||||
|
defaultShader = EditorGUILayout.DelayedTextField(new GUIContent("Default shader", "Default shader for materials auto-generated on import."), defaultShader);
|
||||||
|
#else
|
||||||
|
defaultShader = EditorGUILayout.TextField(new GUIContent("Default shader", "Default shader for materials auto-generated on import."), defaultShader);
|
||||||
|
#endif
|
||||||
if (EditorGUI.EndChangeCheck())
|
if (EditorGUI.EndChangeCheck())
|
||||||
EditorPrefs.SetString(DEFAULT_SHADER_KEY, defaultShader);
|
EditorPrefs.SetString(DEFAULT_SHADER_KEY, defaultShader);
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@ namespace Spine.Unity.Modules {
|
|||||||
[Tooltip("Warning! You will have to re-enable and tune mix values manually if attempting to remove the ragdoll system.")]
|
[Tooltip("Warning! You will have to re-enable and tune mix values manually if attempting to remove the ragdoll system.")]
|
||||||
public bool disableIK = true;
|
public bool disableIK = true;
|
||||||
public bool disableOtherConstraints = false;
|
public bool disableOtherConstraints = false;
|
||||||
[Space]
|
[Space(18)]
|
||||||
[Tooltip("Set RootRigidbody IsKinematic to true when Apply is called.")]
|
[Tooltip("Set RootRigidbody IsKinematic to true when Apply is called.")]
|
||||||
public bool pinStartBone;
|
public bool pinStartBone;
|
||||||
[Tooltip("Enable Collision between adjacent ragdoll elements (IE: Neck and Head)")]
|
[Tooltip("Enable Collision between adjacent ragdoll elements (IE: Neck and Head)")]
|
||||||
|
|||||||
@ -45,16 +45,30 @@ namespace Spine.Unity {
|
|||||||
public Spine.AnimationState state;
|
public Spine.AnimationState state;
|
||||||
public Spine.AnimationState AnimationState { get { return this.state; } }
|
public Spine.AnimationState AnimationState { get { return this.state; } }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Occurs after the animations are applied and before world space values are resolved.
|
||||||
|
/// Use this callback when you want to set bone local values.
|
||||||
|
/// </summary>
|
||||||
public event UpdateBonesDelegate UpdateLocal {
|
public event UpdateBonesDelegate UpdateLocal {
|
||||||
add { _UpdateLocal += value; }
|
add { _UpdateLocal += value; }
|
||||||
remove { _UpdateLocal -= value; }
|
remove { _UpdateLocal -= value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Occurs after the Skeleton's bone world space values are resolved (including all constraints).
|
||||||
|
/// Using this callback will cause the world space values to be solved an extra time.
|
||||||
|
/// Use this callback if want to use bone world space values, and also set bone local values.
|
||||||
|
/// </summary>
|
||||||
public event UpdateBonesDelegate UpdateWorld {
|
public event UpdateBonesDelegate UpdateWorld {
|
||||||
add { _UpdateWorld += value; }
|
add { _UpdateWorld += value; }
|
||||||
remove { _UpdateWorld -= value; }
|
remove { _UpdateWorld -= value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Occurs after the Skeleton's bone world space values are resolved (including all constraints).
|
||||||
|
/// Use this callback if you want to use bone world space values, but don't intend to modify bone local values.
|
||||||
|
/// This callback can also be used when setting world position and the bone matrix.
|
||||||
|
/// </summary>
|
||||||
public event UpdateBonesDelegate UpdateComplete {
|
public event UpdateBonesDelegate UpdateComplete {
|
||||||
add { _UpdateComplete += value; }
|
add { _UpdateComplete += value; }
|
||||||
remove { _UpdateComplete -= value; }
|
remove { _UpdateComplete -= value; }
|
||||||
|
|||||||
@ -14,16 +14,30 @@ namespace Spine.Unity {
|
|||||||
public enum MixMode { AlwaysMix, MixNext, SpineStyle }
|
public enum MixMode { AlwaysMix, MixNext, SpineStyle }
|
||||||
public MixMode[] layerMixModes = new MixMode[0];
|
public MixMode[] layerMixModes = new MixMode[0];
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Occurs after the animations are applied and before world space values are resolved.
|
||||||
|
/// Use this callback when you want to set bone local values.
|
||||||
|
/// </summary>
|
||||||
public event UpdateBonesDelegate UpdateLocal {
|
public event UpdateBonesDelegate UpdateLocal {
|
||||||
add { _UpdateLocal += value; }
|
add { _UpdateLocal += value; }
|
||||||
remove { _UpdateLocal -= value; }
|
remove { _UpdateLocal -= value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Occurs after the Skeleton's bone world space values are resolved (including all constraints).
|
||||||
|
/// Using this callback will cause the world space values to be solved an extra time.
|
||||||
|
/// Use this callback if want to use bone world space values, and also set bone local values.
|
||||||
|
/// </summary>
|
||||||
public event UpdateBonesDelegate UpdateWorld {
|
public event UpdateBonesDelegate UpdateWorld {
|
||||||
add { _UpdateWorld += value; }
|
add { _UpdateWorld += value; }
|
||||||
remove { _UpdateWorld -= value; }
|
remove { _UpdateWorld -= value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Occurs after the Skeleton's bone world space values are resolved (including all constraints).
|
||||||
|
/// Use this callback if you want to use bone world space values, but don't intend to modify bone local values.
|
||||||
|
/// This callback can also be used when setting world position and the bone matrix.
|
||||||
|
/// </summary>
|
||||||
public event UpdateBonesDelegate UpdateComplete {
|
public event UpdateBonesDelegate UpdateComplete {
|
||||||
add { _UpdateComplete += value; }
|
add { _UpdateComplete += value; }
|
||||||
remove { _UpdateComplete -= value; }
|
remove { _UpdateComplete -= value; }
|
||||||
|
|||||||
@ -12,7 +12,6 @@ using UnityEditor;
|
|||||||
#else
|
#else
|
||||||
using UnityEditor.AnimatedValues;
|
using UnityEditor.AnimatedValues;
|
||||||
#endif
|
#endif
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Spine;
|
using Spine;
|
||||||
|
|
||||||
@ -111,12 +110,8 @@ namespace Spine.Unity.Editor {
|
|||||||
|
|
||||||
void UpdateAttachments () {
|
void UpdateAttachments () {
|
||||||
attachmentTable = new Dictionary<Slot, List<Attachment>>();
|
attachmentTable = new Dictionary<Slot, List<Attachment>>();
|
||||||
Skin skin = skeleton.Skin;
|
|
||||||
|
|
||||||
if (skin == null) {
|
|
||||||
skin = skeletonRenderer.skeletonDataAsset.GetSkeletonData(true).DefaultSkin;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
Skin skin = skeleton.Skin ?? skeletonRenderer.skeletonDataAsset.GetSkeletonData(true).DefaultSkin;
|
||||||
for (int i = skeleton.Slots.Count-1; i >= 0; i--) {
|
for (int i = skeleton.Slots.Count-1; i >= 0; i--) {
|
||||||
List<Attachment> attachments = new List<Attachment>();
|
List<Attachment> attachments = new List<Attachment>();
|
||||||
skin.FindAttachmentsForSlot(i, attachments);
|
skin.FindAttachmentsForSlot(i, attachments);
|
||||||
@ -229,14 +224,14 @@ namespace Spine.Unity.Editor {
|
|||||||
GUI.contentColor = Color.white;
|
GUI.contentColor = Color.white;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if UNITY_4_3
|
#if UNITY_4_3
|
||||||
|
|
||||||
#else
|
#else
|
||||||
}
|
}
|
||||||
EditorGUILayout.EndFadeGroup();
|
EditorGUILayout.EndFadeGroup();
|
||||||
if (showSlots.isAnimating)
|
if (showSlots.isAnimating)
|
||||||
Repaint();
|
Repaint();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpawnHierarchyContextMenu () {
|
void SpawnHierarchyContextMenu () {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user