설명 없음
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DeformationManagerUpdater.cs 917B

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