mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[unity] SkeletonMecanim: Changed default MixMode to MixMode.SpineStyle since this potentially prevents dipping to setup pose problems. Cleanup of old text strings mentioning SkeletonAnimator instead of SkeletonMecanim.
This commit is contained in:
parent
f5f77ef481
commit
848faf08b3
@ -558,7 +558,7 @@ namespace Spine.Unity.Editor {
|
|||||||
void DrawUnityTools () {
|
void DrawUnityTools () {
|
||||||
#if SPINE_SKELETON_MECANIM
|
#if SPINE_SKELETON_MECANIM
|
||||||
using (new SpineInspectorUtility.BoxScope()) {
|
using (new SpineInspectorUtility.BoxScope()) {
|
||||||
isMecanimExpanded = EditorGUILayout.Foldout(isMecanimExpanded, SpineInspectorUtility.TempContent("SkeletonAnimator", SpineInspectorUtility.UnityIcon<SceneAsset>()));
|
isMecanimExpanded = EditorGUILayout.Foldout(isMecanimExpanded, SpineInspectorUtility.TempContent("SkeletonMecanim", SpineInspectorUtility.UnityIcon<SceneAsset>()));
|
||||||
if (isMecanimExpanded) {
|
if (isMecanimExpanded) {
|
||||||
using (new SpineInspectorUtility.IndentScope()) {
|
using (new SpineInspectorUtility.IndentScope()) {
|
||||||
EditorGUILayout.PropertyField(controller, SpineInspectorUtility.TempContent("Controller", SpineInspectorUtility.UnityIcon<Animator>()));
|
EditorGUILayout.PropertyField(controller, SpineInspectorUtility.TempContent("Controller", SpineInspectorUtility.UnityIcon<Animator>()));
|
||||||
@ -570,7 +570,7 @@ namespace Spine.Unity.Editor {
|
|||||||
if (GUILayout.Button(SpineInspectorUtility.TempContent("Generate Mecanim Controller"), GUILayout.Height(20)))
|
if (GUILayout.Button(SpineInspectorUtility.TempContent("Generate Mecanim Controller"), GUILayout.Height(20)))
|
||||||
SkeletonBaker.GenerateMecanimAnimationClips(targetSkeletonDataAsset);
|
SkeletonBaker.GenerateMecanimAnimationClips(targetSkeletonDataAsset);
|
||||||
}
|
}
|
||||||
EditorGUILayout.HelpBox("SkeletonAnimator is the Mecanim alternative to SkeletonAnimation.\nIt is not required.", MessageType.Info);
|
EditorGUILayout.HelpBox("SkeletonMecanim is the Mecanim alternative to SkeletonAnimation.\nIt is not required.", MessageType.Info);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|||||||
@ -174,7 +174,7 @@ namespace Spine.Unity.Editor {
|
|||||||
} else {
|
} else {
|
||||||
var boneFollowerSkeletonGraphic = targetBoneFollower.skeletonGraphic;
|
var boneFollowerSkeletonGraphic = targetBoneFollower.skeletonGraphic;
|
||||||
if (boneFollowerSkeletonGraphic == null) {
|
if (boneFollowerSkeletonGraphic == null) {
|
||||||
EditorGUILayout.HelpBox("SkeletonGraphic is unassigned. Please assign a SkeletonRenderer (SkeletonAnimation or SkeletonAnimator).", MessageType.Warning);
|
EditorGUILayout.HelpBox("SkeletonGraphic is unassigned. Please assign a SkeletonRenderer (SkeletonAnimation or SkeletonMecanim).", MessageType.Warning);
|
||||||
} else {
|
} else {
|
||||||
boneFollowerSkeletonGraphic.Initialize(false);
|
boneFollowerSkeletonGraphic.Initialize(false);
|
||||||
|
|
||||||
|
|||||||
@ -180,7 +180,7 @@ namespace Spine.Unity.Editor {
|
|||||||
} else {
|
} else {
|
||||||
var boneFollowerSkeletonRenderer = targetBoneFollower.skeletonRenderer;
|
var boneFollowerSkeletonRenderer = targetBoneFollower.skeletonRenderer;
|
||||||
if (boneFollowerSkeletonRenderer == null) {
|
if (boneFollowerSkeletonRenderer == null) {
|
||||||
EditorGUILayout.HelpBox("SkeletonRenderer is unassigned. Please assign a SkeletonRenderer (SkeletonAnimation or SkeletonAnimator).", MessageType.Warning);
|
EditorGUILayout.HelpBox("SkeletonRenderer is unassigned. Please assign a SkeletonRenderer (SkeletonAnimation or SkeletonMecanim).", MessageType.Warning);
|
||||||
} else {
|
} else {
|
||||||
boneFollowerSkeletonRenderer.Initialize(false);
|
boneFollowerSkeletonRenderer.Initialize(false);
|
||||||
|
|
||||||
|
|||||||
@ -71,7 +71,7 @@ namespace Spine.Unity.Editor {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static class SkeletonBaker {
|
public static class SkeletonBaker {
|
||||||
|
|
||||||
#region SkeletonAnimator's Mecanim Clips
|
#region SkeletonMecanim's Mecanim Clips
|
||||||
#if SPINE_SKELETONMECANIM
|
#if SPINE_SKELETONMECANIM
|
||||||
public static void UpdateMecanimClips (SkeletonDataAsset skeletonDataAsset) {
|
public static void UpdateMecanimClips (SkeletonDataAsset skeletonDataAsset) {
|
||||||
if (skeletonDataAsset.controller == null)
|
if (skeletonDataAsset.controller == null)
|
||||||
|
|||||||
@ -159,8 +159,10 @@ namespace Spine.Unity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void Apply (Skeleton skeleton) {
|
public void Apply (Skeleton skeleton) {
|
||||||
if (layerMixModes.Length < animator.layerCount)
|
if (layerMixModes.Length < animator.layerCount) {
|
||||||
System.Array.Resize<MixMode>(ref layerMixModes, animator.layerCount);
|
System.Array.Resize<MixMode>(ref layerMixModes, animator.layerCount);
|
||||||
|
layerMixModes[animator.layerCount-1] = MixMode.SpineStyle;
|
||||||
|
}
|
||||||
|
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
if (!Application.isPlaying) {
|
if (!Application.isPlaying) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user