Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question UI Elements position problem after Unity restart

Discussion in 'General Discussion' started by CorraArt, Aug 5, 2023.

  1. CorraArt

    CorraArt

    Joined:
    Apr 6, 2019
    Posts:
    2
    Hello everyone,

    I have a weird problem. Every time I restart Unity 2022.3 my UI doesn't work like before I closed the program. I made a Prefab for my UI game objects: one prefab for the dialogue system and one for static elements like the clock and other things that need to be shown permanently.
    After Unity restart, these prefab Y positions get overwritten automatically to 0 and some of the child values are set to NaN.
    Also, child prefabs caused rebuild loop errors too but I could fix that by resetting the prefabs...
    Anyone here with similar issues or tipps to get this solved? Is the problem that my Canvas in inside a Game Object Prefab?
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,556
    If your Prefab is set, but I ta tiated in scene, then you need save scene.
    Chances are you manipulate values of game objecs instantiated from prefabs, but not saving the scene, when closing Unity.

    That is my guess however, what may be cause of the issue.
     
  3. CorraArt

    CorraArt

    Joined:
    Apr 6, 2019
    Posts:
    2
    Thank you for the answer but I don't think that it's because I am not saving my scene. I save like crazy and make sure there are no uncommitted changes.
     
    lukasvogl likes this.