Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/grahfmusic/powerquest-letterboxer
LetterBoxer Fix for PowerQuest/Unity
https://github.com/grahfmusic/powerquest-letterboxer
Last synced: 4 days ago
JSON representation
LetterBoxer Fix for PowerQuest/Unity
- Host: GitHub
- URL: https://github.com/grahfmusic/powerquest-letterboxer
- Owner: grahfmusic
- Created: 2023-01-23T23:21:52.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-23T23:23:39.000Z (almost 2 years ago)
- Last Synced: 2024-11-11T23:15:37.356Z (2 months ago)
- Language: C#
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# powerquest-letterboxer
LetterBoxer Fix for PowerQuest/Unity created by Guga (gugames.itch.io)After a few tries I think I have a stable and mature solution for letterboxing / pillarboxing for PowerQuest games.
It starts with a modified version of the LetterBoxer asset you can find on the Unity store. Why modified? Because PowerQuest uses two cameras, the game cam and the gui cam, and the LetterBoxer component complains if you have more than one. I attach my modified version.
Add this asset to your project and add the LetterBoxer component to both the QuestGuiCamera and the QuestCamera prefabs. Choose the aspect ratio and color, tick both on awake and on update, and tick the Add Extra Camera for only one of the two prefabs.
The second step is to open the SystemTime prefab (in Assets/Game) and add "LetterBoxer" (warning: it's case sensitive!) to the Ignored Components list. This is important so that the LetterBoxer keeps working also when you're, for example, showing the pause gui.
The third step is to fix the savegame screenshots, if you have those. In PowerQuestSave.cs, in the Save function, disable the letterboxer, save the old camera viewport rect, reset it to 0,0,1,1, and after the screenshot has been rendered, reactivate the letterboxer and restore the old viewport rect. I'll post the code in a comment because it's a bit long