Page 1 of 1
Letterbox / Pillarbox and Screen.width/height safe?
Posted: Fri Apr 17, 2020 3:51 pm
by VoodooDetective
I was just about to implement letterboxing and realized it would make Screen.width, Screen.height inaccurate. I was just wondering if DS makes use of those methods, and if so, the recommended approach for handling letterboxing.
Here's the letterboxing script:
https://github.com/mlvhub/unity/blob/ma ... Utility.cs
That's sort of vaguely what I was planning to do.
Re: Letterbox / Pillarbox and Screen.width/height safe?
Posted: Fri Apr 17, 2020 4:26 pm
by Tony Li
Hi,
By default, the Dialogue System uses plain old Unity UI. It doesn't do anything special for letterboxing. Your script can adjust the canvas for letterboxing if you want.
Re: Letterbox / Pillarbox and Screen.width/height safe?
Posted: Fri Apr 17, 2020 5:28 pm
by VoodooDetective
Ah ok, great. Well one more question then, the canvas will lose the reference to your camera if you don't use Don't Destroy on Load on the camera. I was just wonder if you think it's best to use Don't Destroy on Load on the camera, or just have a script that updates the reference on scene change?
Re: Letterbox / Pillarbox and Screen.width/height safe?
Posted: Fri Apr 17, 2020 5:53 pm
by VoodooDetective
That's a silly question, I'll use a script.
Re: Letterbox / Pillarbox and Screen.width/height safe?
Posted: Fri Apr 17, 2020 5:57 pm
by Tony Li
Sounds good!