Нет описания
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

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. }