소스 검색

[unity] Fixed BoneFollowerGraphic silently failing at Transform instead of RectTransform by requiring component RectTransform. Closes #1828.

Harald Csaszar 4 년 전
부모
커밋
a7f629f504
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      spine-unity/Assets/Spine/Runtime/spine-unity/Components/Following/BoneFollowerGraphic.cs

+ 1 - 1
spine-unity/Assets/Spine/Runtime/spine-unity/Components/Following/BoneFollowerGraphic.cs

@@ -40,7 +40,7 @@ namespace Spine.Unity {
 	#else
 	[ExecuteInEditMode]
 	#endif
-	[DisallowMultipleComponent]
+	[RequireComponent(typeof(RectTransform)), DisallowMultipleComponent]
 	[AddComponentMenu("Spine/UI/BoneFollowerGraphic")]
 	[HelpURL("http://esotericsoftware.com/spine-unity#BoneFollowerGraphic")]
 	public class BoneFollowerGraphic : MonoBehaviour {