Author Topic: Need Help with Camera, Canvas & Background  (Read 662 times)


  • Junior Playmaker
  • **
  • Posts: 70
    • View Profile
Need Help with Camera, Canvas & Background
« on: April 14, 2017, 04:21:04 PM »

I am trying to get my background the scale to find the different pixel resolutions out there.  I have an idea, but I am not to sure how to implement it. This is my idea using playmaker to solve the scaling issue -

1. Using playmaker use "Get Screen Width" and "Get Screen Height"
2. Set the camera to the Width and Height in 1.
3. Set the background pic to the Width and Height in 1.

I cannot figure out how to do (2) and (3) as I see nothing in the Action Browser. Any ideas.

Also can some one tell me why on UI elements can be attached to the canvas. Won't life in unity be 10000000000 times simpler if anything (images, animations, sprites) could all be attached to the canvas via anchors?  Then eventhing could move synchronous  when scaling occurs.

Is there anthing in ECO SYSTEM that can solve this issue?

thanks guys


  • Full Member
  • ***
  • Posts: 233
  • Debt we all must pay...
    • View Profile
Re: Need Help with Camera, Canvas & Background
« Reply #1 on: April 15, 2017, 11:21:04 AM »
I am not sure if I understand you correctly but are you trying to scale the background to fit all resolutions? If yes then all you have to do is to use anchors and stretch the background's transform automatically for all sides, the playmaker is not needed for that.

Let's say you have a box, and you set anchors for it to stretch 0.2 to 0.8, if you create a second box, and you attach that box to the first box, you can set the anchors on second box to stretch all sides, and then it will fill out the first box.

All the elements on a canvas, providing that they all have setup the desired anchors, will scale on all devices "correctly".