Browse Source

[unity] Fix compatibility with Unity 5.1.

pharan 9 years ago
parent
commit
13f433d13d

+ 1 - 1
spine-unity/Assets/Examples/Scripts/SpineboyPole.cs

@@ -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]

+ 5 - 1
spine-unity/Assets/spine-unity/Editor/SpineEditorUtilities.cs

@@ -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);
 			
 			

+ 1 - 1
spine-unity/Assets/spine-unity/Modules/Ragdoll/SkeletonRagdoll.cs

@@ -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)")]