Search Unity

Pathfinding is corrupting UXMLs

Discussion in 'UI Toolkit' started by LaneFox, May 20, 2022.

  1. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,532
    If you set an image reference in UI Builder, then move those images somewhere else in the project, UI Toolkit will not be able to find them and will remove the path from the file which permanently corrupts it, so it cannot even be restored if you just move the files back to the correct folder.

    This is terrible design.

    Store these images by GUID, and cache the direct reference. At the very least avoid corrupting the UXML data just because it would generate a warning every tick. Capture that properly.
     
    SonicBloomEric and MechaWolf99 like this.
  2. JuliaP_Unity

    JuliaP_Unity

    Unity Technologies

    Joined:
    Mar 26, 2020
    Posts:
    700
    Hello! In more recent versions of Unity (like 2021.3), we do that. What version are you on?