Search Unity

Bug UI Images preserve aspect and setActive(false) in awake

Discussion in 'Web' started by sumpfkraut, Aug 29, 2022.

  1. sumpfkraut

    sumpfkraut

    Joined:
    Jan 18, 2013
    Posts:
    242
    v 2022.1.14f1
    Images (and videos) always get stretched to canvas size - and ignore the "preserve aspect" checkbox.
    Videos also not playing on mobile devices.

    Disable objects in "awake" seems not to work. (.setActive(false))

    In the current LTS version 2021.3.8f1 everything works fine. so it's not my code ;)
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,049
    Sounds like a regression if it works in LTS. Please file a bug report with the project
     
  3. sumpfkraut

    sumpfkraut

    Joined:
    Jan 18, 2013
    Posts:
    242
    I just did a new example project, and there everything works fine...
    Since I can't reproduce it myself, ignore it. Pearhaps i find the problem myself.

    Edit: I had to delete the "Library" folder. Now it works again.
     
    Last edited: Aug 30, 2022
    DevDunk likes this.