• 한국어
  • MatchRectTransformWithBounds 에러

  • Modificato
Related Discussions
...

SkeletonGraphic 의 MatchRectTransformWithBounds 함수를 코드로 실행하면

Invalid AABB inAABB
UnityEngine.UI.Graphic:Rebuild (UnityEngine.UI.CanvasUpdate)
Spine.Unity.SkeletonGraphic:Rebuild (UnityEngine.UI.CanvasUpdate) (at Assets/Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs:237)

라는 오류가 나옵니다.

하지만, 해당 기능을 컴포넌트의 Match 버튼으로 실행 시키면 문제가 일어나지 않더라고요! :think:

Invalid AABB 오류 자체에 대해서도 조금 알아봤지만 해결이 되지 않아서 질문을 남깁니다. :tear:

SkeletonGraphic.cs:237 및 스택 추적은 Rebuild와 관련된 코드를 표시하지만 MatchRectTransformWithBounds는 표시하지 않습니다. 실수로 잘못된 오류 메시지를 복사했습니까?

어디에서 MatchRectTransformWithBounds를 호출하고 있습니까? Awake에서 호출하는 건가요 아니면 Start에서 호출하는 건가요? 스켈레톤과 메시가 아직 초기화되지 않은 상태라면 너무 이른 것일 수 있습니다. 따라서 MatchRectTransformWithBounds()를 호출하기 전에 skeleton.Initialize(false)를 호출하면 이 문제를 해결할 수 있습니다.


SkeletonGraphic.cs:237 and your stack trace shows code related to Rebuild, but not MatchRectTransformWithBounds. Did you accidentally copy the wrong error message?

From where are you calling MatchRectTransformWithBounds? Are you calling it from Awake or from Start? It might be too early when the skeleton and the Mesh are not initialized yet. So a call to skeleton.Initialize(false) before calling MatchRectTransformWithBounds() might perhaps solve this problem.