Search Unity

Question Same project, different visualization

Discussion in 'Editor & General Support' started by adria_ec, Jul 21, 2021.

  1. adria_ec

    adria_ec

    Joined:
    Sep 16, 2015
    Posts:
    6
    Dear all, I'm having a problem that is starting to be pretty anoying. I post it in case anyone could offer an idea and try to know why this is happening.

    As context, I'm working on a project that needs to visualize DICOM images, I'm using the plugin "Simple DICOM Loader" to manage it.

    The problem is that the same project - freshly downloaded into different computers - shows two different versions when is executed. I've never had this problem before using Unity, I don't know if it's a possible bug or if it's my fault, but as I extract the project from a .zip in different computer and press play and the result in visualization is different I understand that the code shouldn't be the problem.

    Some computers show the correct version
    img1.PNG


    Other computers display something that is clearly a mistake
    img2.PNG

    I've tryied looking for similar cases but all I find is posts and tutorials on how to work on the same project with different computers.

    Any clue is more than welcome.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,689
    To me the above looks perhaps like a scaling issue, like in the second image you are deep inside some group of yellow pixels that are shown from a much further distance in the top image. This could be simply faulty scaling based on the screen dimensions, aspect ratio, or even bad anchoring if you're using UI classes.

    First step would be to isolate if this DICOM thing is failing, or if your code is somehow behaving differently.

    Make a DICOM image with a known dot pattern, like a small box or an "X" or something in the middle, and see how it differs between computers with that known small test image.

    Another good test image would have one pixel dead center, and display its actual and rendered coordinates onscreen on each computer, so you can reason about what is happening.

    If you are using Unity UI stuff, here's some more notes to isolate the problem:

    Here are some notes on UI Anchoring, Scaling, CanvasScaler, etc:

    https://forum.unity.com/threads/inc...size-between-two-people.1130146/#post-7261747

    https://forum.unity.com/threads/game-ui-button-size-problem.1142650/#post-7337383
     
  3. adria_ec

    adria_ec

    Joined:
    Sep 16, 2015
    Posts:
    6
    Thank you very much for all the possibilities you mentioned and the links, I will try and let you know if I solve it.
     
  4. adria_ec

    adria_ec

    Joined:
    Sep 16, 2015
    Posts:
    6
    SOLVED!
    It was a language problem that confused . and ,
    Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; solved this.
     
    Kurt-Dekker likes this.