説明なし
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

SpriteSkinUpdateHelper.cs 970B

1234567891011121314151617181920212223242526272829303132333435
  1. using Unity.Profiling;
  2. namespace UnityEngine.U2D.Animation
  3. {
  4. [AddComponentMenu("")]
  5. [DefaultExecutionOrder(-1)]
  6. [ExecuteInEditMode]
  7. internal class SpriteSkinUpdateHelper : MonoBehaviour
  8. {
  9. public System.Action<GameObject> onDestroyingComponent
  10. {
  11. get;
  12. set;
  13. }
  14. ProfilerMarker m_ProfilerMarker = new ProfilerMarker("SpriteSkinUpdateHelper.LateUpdate");
  15. void OnDestroy() => onDestroyingComponent?.Invoke(gameObject);
  16. void LateUpdate()
  17. {
  18. #if ENABLE_ANIMATION_BURST && ENABLE_ANIMATION_COLLECTION
  19. if (SpriteSkinComposite.instance.helperGameObject != gameObject)
  20. {
  21. GameObject.DestroyImmediate(gameObject);
  22. return;
  23. }
  24. m_ProfilerMarker.Begin();
  25. SpriteSkinComposite.instance.LateUpdate();
  26. m_ProfilerMarker.End();
  27. #endif
  28. }
  29. }
  30. }