Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Detecting updates to the RectTransform

Discussion in 'UGUI & TextMesh Pro' started by ChickenVegetable, Jul 23, 2023.

  1. ChickenVegetable


    May 3, 2020

    I have some UI elements based around the Shapes plugin and Rect Transforms. I have an editor script monitoring for user changes to the Rect in both OnInspectorGUI() and OnSceneGUI(), which propagates values to the Shapes components so the UI element can be arranged in real time using the Rect controls.

    However the scripts do not detect when the RectTransform is modified externally by a Grid Layout Group, for example because neither callback is called in that case and I can't find one that is.

    Short of using Update is there any way to get notified when a component's RectTransform is modified externally?