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 Pixel perfect custom canvas scaler + scene reload issue

Discussion in 'UGUI & TextMesh Pro' started by rgsoftware, Apr 8, 2024.

  1. rgsoftware


    Oct 25, 2017
    Hi all,

    I am trying to implement pixel perfect graphics in my app using the standard Pixel Perfect camera and its Custom Canvas Scaler. The issue I am having now is this. One of the UI elements is a scrollbar area with a few elements. Each element is a prefab (a text string + a couple of buttons). I instantiate these elements dynamically via Instantiate() in scene's Start().

    It works okay until I switch to another scene and back. This time, prefabs are not scaled anymore. What I see is the otherwise normally looking UI with very small list items. I tried calling LayoutRebuilder.ForceRebuildLayoutImmediate(), but it doesn't make any difference. Any suggestions?..