0

I'm developing a demo for Android game in Unity with portrait layout. I used the ViewportHandler script found here (How do you handle aspect ratio differences with Unity 2D?) and it worked well. Yesterday I updated Unity (foolish move I know, two days before deliver of a project!!) to 5.4.2f2 (was using 5.4.1f1). I don't know if that is the reason but now I can in no way get my correct layout again. Sure, it is portrait but all squashed in the center and taking about one-third of the screen, rest just background camera-colour. Things looked well yesterday but now I'm in big trouble :(

Any help would be greatly appreciated!

BFK
  • 3
  • 1

1 Answers1

0

Start downloading the older version and install it. Build it for every platform that you want it for once you have it working again.

As for the question is there any chance that you could give a screenshot (I know that will probably not be possible)? Try creating a new project then try the script with a very simple scene.

  • If it works figure out what is different, keep in mind sometimes updates clear the settings that you have applied to scripts (values, references to GameObjects, etc.).
  • If it doesn't work in the new project it's time to debug the code. Possibly look at the change logs and see if anything changes how the camera works or if the viewports are different.

I'm guessing that it is the former, I've had it happen a few times which meant that i had to go back and look at the version before in my version control to see what the scrips values used to be before they got reset.

Side note: I would have written this in the comment section but I hit the character limit... sorry :)

Hope this helps anyway.

user3797758
  • 3,631
  • 2
  • 28
  • 51
  • Hehehe, sometimes good to take a step back when overly panicking ;) It's up an running. Removed all cameras and set them all again, clean slate and some "annoyances" following the update must have cleared off. Thank you for your reply :) – BFK Oct 25 '16 at 18:12