gilzoide / unity-flex-ui

Flexbox layout support for Unity UI using the Yoga layout engine
The Unlicense
80 stars 5 forks source link

Layout gets broken after domain reload #21

Closed gilzoide closed 2 months ago

gilzoide commented 2 months ago

After a domain reload occurs, Flex layouts don't seem to update anymore in Editor. Calling "RefreshRootLayoutImmediate" manually fixes the layout, but changing properties or moving children don't refresh the layout anymore. This may be related to a reset of the native YGNode pointer, which is not serialized by Unity.

Tested in Unity 2022.3.25

gilzoide commented 2 months ago

The problem actually only occurs if the root object has a disabled FlexLayout.