mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +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 () {
|
||||
#if SPINE_SKELETON_MECANIM
|
||||
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) {
|
||||
using (new SpineInspectorUtility.IndentScope()) {
|
||||
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)))
|
||||
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 {
|
||||
|
||||
|
||||
@ -174,7 +174,7 @@ namespace Spine.Unity.Editor {
|
||||
} else {
|
||||
var boneFollowerSkeletonGraphic = targetBoneFollower.skeletonGraphic;
|
||||
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 {
|
||||
boneFollowerSkeletonGraphic.Initialize(false);
|
||||
|
||||
|
||||
@ -180,7 +180,7 @@ namespace Spine.Unity.Editor {
|
||||
} else {
|
||||
var boneFollowerSkeletonRenderer = targetBoneFollower.skeletonRenderer;
|
||||
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 {
|
||||
boneFollowerSkeletonRenderer.Initialize(false);
|
||||
|
||||
|
||||
@ -71,7 +71,7 @@ namespace Spine.Unity.Editor {
|
||||
/// </summary>
|
||||
public static class SkeletonBaker {
|
||||
|
||||
#region SkeletonAnimator's Mecanim Clips
|
||||
#region SkeletonMecanim's Mecanim Clips
|
||||
#if SPINE_SKELETONMECANIM
|
||||
public static void UpdateMecanimClips (SkeletonDataAsset skeletonDataAsset) {
|
||||
if (skeletonDataAsset.controller == null)
|
||||
|
||||
@ -159,8 +159,10 @@ namespace Spine.Unity {
|
||||
}
|
||||
|
||||
public void Apply (Skeleton skeleton) {
|
||||
if (layerMixModes.Length < animator.layerCount)
|
||||
if (layerMixModes.Length < animator.layerCount) {
|
||||
System.Array.Resize<MixMode>(ref layerMixModes, animator.layerCount);
|
||||
layerMixModes[animator.layerCount-1] = MixMode.SpineStyle;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
if (!Application.isPlaying) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user