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
Other computers display something that is clearly a mistake
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.
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:
SOLVED!
It was a language problem that confused . and ,
Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; solved this.