- Home /
major changes in Unity3D 4x
So before i go into posting code and the underlying problem itself. I have noticed something extremely disturbing switching from Unity3D 3.5.7 to the latest 4x iteration. I'm building this puzzle game, long story short... it cuts up an image in individual tiles blabla using getpixel and setpixel method of Texture2D... All this worked fine, then i switched to latest Unity3D version. Its hard to explain this because its unthinkable but anyway the puzzles generated look completely different now, its the same project same routine same everything!
How is this possible? Is this for real? Isn't it incredibly stupid to make changes that have effects like these? Does anyone know if something major has changed that i don't know about or something? This REALLY annoys me..
Has something major changed? Yes, that's why the major version number changed from 3.x to 4.x....
In fact, there can be some pretty major changes even between $$anonymous$$or version numbers - 4.1, 4.2, and 4.3 all introduced some pretty big changes. But which one explains the change in your code's behaviour is only possible to tell when we see your code...
Before i do. Coord 0,0 used to be bottom left corner for a Texture2D image. So for a 256x256 image. 0,256 would the first pixel from a Unity perspective... Has this changed?
Assu$$anonymous$$g you're talking about GetPixels, that returns a flattened 2D array where pixels are laid out left to right, bottom to top. So yes, (0,0) is the bottom left corner, as you describe.
Yes and SetPixels would work along this same principle i assume right? I know it does in Unity3D 3.5.7, but as it all looks scrambled now i figured something might have changed in that regard.
Nothing changed in that regard. You can look at the release notes for what actually changed.
Answer by Balthatczar · Feb 03, 2014 at 09:43 PM
So... figured out the problem, turns out that the public GameObject array holding references to the tiles on which the images are projected weren't lined up in the right order anymore in the inspector once i opened the scene in Unity 4.3.4, had to set them right manually...
If you receive a satisfactory answer to your question please respond it with the solution, that will be very helpful for future reference. Thanks for your comprehension, Unity Support.
You know, as moderators, we have the option of converting comments to answers (and vice versa).
I'm a little confused, should i remove this answer and post it as comment ins$$anonymous$$d?
Your answer
Follow this Question
Related Questions
Creating random planet textures 3 Answers
Loading a Sprite (Unity 4.3) in resource folder and setting it in sprite renderer 6 Answers
How to show image on Camera View programmatically in Unity3d 1 Answer
How does setting the hideFlags resolve leaking issues? (Texture 2D leaking) 2 Answers
rotate an image by modifying Texture2D.GetPixels32() array 2 Answers