Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

Strange Issue With Grid / Image Component

Discussion in '2019.1 Beta' started by Remer, Apr 11, 2019.

  1. Remer

    Remer

    Joined:
    Mar 24, 2013
    Posts:
    75
    Hello,
    After project migration (from 2018.3.12 to 2019.1.f1) my script stopped working.
    The script simply instantiates a prefab that contains an Image component, into a Grid Component, and assign a sprite to every Image.
    Even if the sprite is assigned to the Image at runtime, it is displayed in a strange way.

    Screenshot 2019-04-11 11.03.59.png
     
    Last edited: Apr 12, 2019
  2. ChaosMage

    ChaosMage

    Joined:
    Sep 5, 2012
    Posts:
    14
    There is something wrong with UGUI in 19.1f1. In my case I see UI elements imported from 18.3 in scene window in reverse order. This is in editor only. The game looks good.
     
  3. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    2,496
    Could you please submit bug reports with minimal reproduction projects for these issues and reply in here with the issue IDs?
     
  4. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,199
    Could both of you (@Remer @Derkon) submit a bug report? I believe they will be different issues.
     
    karl_jones likes this.
  5. ChaosMage

    ChaosMage

    Joined:
    Sep 5, 2012
    Posts:
    14
    Looks like it is a LWRP 5.10 bug. Downgrading it to 5.7.2 fixed the issue.
     

    Attached Files:

    Last edited: Apr 12, 2019
  6. Remer

    Remer

    Joined:
    Mar 24, 2013
    Posts:
    75
    I tried to reproduce the issue but the test project works perfectly. Perhaps it is a problem due to the migration between 2018.3 and 2019. In fact I tried to open it with 2018.3 and it works perfectly, while with 2019.1.b10 and f1 it doesn't work.
     
  7. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    2,496
    It would be great if you could send us the 2018.3 version of the project. If it's a large project, I can provide you with a link to an alternative file hosting system.
     
  8. Remer

    Remer

    Joined:
    Mar 24, 2013
    Posts:
    75
    I can send it, but it is a project related to a paid app on the Google Play Store, so I will send you a pm.

    The issue is inside the scene 03_SelectGame, and it seems related to the UpdateUI function in the SelectModeMenu.cs script. Maybe the issue depends on this line of code
    Code (CSharp):
    1. shopButton.thumbnail.sprite = backgroundData.properties.thumbnail;
    (where i assign a sprite obtained from a scriptable object)
     
    LeonhardP likes this.
  9. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,199
    @Remer So without a official bug with way more description i can't 100% verify that its been fixed but what i'm seeing after a fix I did a few days ago seems like its fine now. The fix will be backported
     
  10. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,199
    @Derkon Are you able to submit a bug?
     
  11. Remer

    Remer

    Joined:
    Mar 24, 2013
    Posts:
    75
    This fix will be in the next rc or maybe it's a simple package update? In any case, I will see if everything works and I will answer here to let you know.
     
unityunity