Search Unity

Import resolution settings into another project

Discussion in 'Editor & General Support' started by an_n, Aug 7, 2018.

  1. an_n

    an_n

    Joined:
    Apr 17, 2014
    Posts:
    15
    Hi everyone,
    I have multiple screen resolutions for different mobile devices and now I would like to use the settings in my another unity project. But, I'm too lazy to recreate them all again. I thought, unity is storing such settings in some file or something like this, that I can just copy-paste them into another unity project, but alas - I can't find such file, but I saw some binary unity data in windows registry and I hope that data from registry are not that settings I need, because how then can I import them into another unity project?
    So there is a question: Is it possible to import screen resolutions settings from one project to another one?
    Thank you for help :)

     
  2. MSplitz-PsychoK

    MSplitz-PsychoK

    Joined:
    May 16, 2015
    Posts:
    1,278
    The file that stores these settings should be consistent between projects, so long as you use the same version of Unity. The file that stored these Game View resolutions can most likely be found here on your hard drive:

    C:\Users\<username>\AppData\Roaming\Unity\<Editor version>\Preferences\GameViewSizes.asset


    Note: I can add a new resolution to a project in Unity 5.6 and see that new resolution in a different project using 5.4 without having to copy anything.
     
  3. an_n

    an_n

    Joined:
    Apr 17, 2014
    Posts:
    15
    Thank you for your help, very appreciate this! :) Really, I can see the resolutions in the GameViewSizes file, but this is strange - I can not see these resolutions in another one different project on my PC. This is quite strange, because I'm using only one version of Unity for all my projects on my PC (I even have only one version on PC), then from where the second project is taking its list of resolutions?! o_O



     
  4. MSplitz-PsychoK

    MSplitz-PsychoK

    Joined:
    May 16, 2015
    Posts:
    1,278
    That's very strange.. when you add a new resolution to your second project, do you see any of those AppData files get changed? If so, maybe you could copy your resolutions from one file into the other.

    Maybe one of your projects uses the AppData of a specific user because of where the project is saved?

    I'm not really sure what else I can recommend because this issue doesn't happen on my Windows 10 machine using Unity 5.6.6f2. Good luck!
     
  5. an_n

    an_n

    Joined:
    Apr 17, 2014
    Posts:
    15
    Strange I see changes in the GameViewSizes file when I'm adding resolutions to that another project, BUT I can't see these resolutions I just added in the first project. However search inside the GameViewSizes shows me both resolutions - from the first and second project. Looks like Unity editor can't read these resolutions from the file properly or the editor separates these resolutions somehow for different projects by some strange reasons.

    I also thought that it would be the reason of the problem, but I have only one user on my PC and I checked all folders in Users folder and did not find any unity settings.

    Thank you for your answers! :) At Least now I see that it is something unusual %)
     
  6. an_n

    an_n

    Joined:
    Apr 17, 2014
    Posts:
    15
    I've understood everything!!! %)

    Yes, in the GameViewSizes file there is a separation by platform, for example, for Standalone there is one list of resolutions, but for Android another one (and for iOS third one) and so on.
    So I have two projects, but one project is for Android and another one is Standalone project (I just didn't switch the platform yet) - because of this I see different resolutions.
    Is is just beautiful.
    So thank you Gambit-MSplitz once again for your answers!
    I hope this thread will help someone else, if someone will have the same misunderstanding.

    There is a part from GameViewSizes file for better understanding (I just move resolutions I need from one section (android) to another one (iOs for example), or just switch the platform in unity editor)

    m_Standalone:
    m_Custom:
    - m_BaseText: iPhone Portrait
    m_SizeType: 1
    m_Width: 640
    m_Height: 1136
    - m_BaseText: iphone land
    m_SizeType: 1
    m_Width: 1136
    m_Height: 640
    m_iOS:
    m_Custom: []
    m_Android:
    m_Custom:
    - m_BaseText: nexus 7
    m_SizeType: 1
    m_Width: 1920
    m_Height: 1200
    - m_BaseText: galaxy s6/s7
    m_SizeType: 1
    m_Width: 2560
    m_Height: 1440
    - m_BaseText: galaxy tab a10.1 2016
    m_SizeType: 1
    m_Width: 1919
    m_Height: 1200
    - m_BaseText: nexus 7 port
    m_SizeType: 1
    m_Width: 1200
    m_Height: 1920
    - m_BaseText: galaxy s8 port
    m_SizeType: 1
    m_Width: 1440
    m_Height: 2960
     
    quangtqag likes this.
  7. MSplitz-PsychoK

    MSplitz-PsychoK

    Joined:
    May 16, 2015
    Posts:
    1,278
    Good find, glad you figured it out!