Document forcePortrait Option for Landscape-Locked Games#19
Merged
huda-stash merged 1 commit intomainfrom Mar 2, 2026
Merged
Conversation
95bfb77 to
1c134cd
Compare
- Add guidance for using forcePortrait=true when game is locked to landscape - Update OpenCard() example to show forcePortrait usage - Clarify that portrait orientation must be enabled in Unity Player Settings - Ensures partners know to set forcePortrait for usable checkout in landscape games Made-with: Cursor
1c134cd to
8bf37ac
Compare
oliexe
approved these changes
Mar 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Document forcePortrait Option for Landscape-Locked Games
Overview
This PR adds documentation and sample code comments to guide partners on using the existing
forcePortraitoption when their Unity games are locked to landscape orientation. This ensures checkout is always usable by displaying in portrait mode, even when the game itself is locked to landscape.Problem
When a Unity game is locked to landscape orientation (
defaultScreenOrientation: 4), the Stash checkout would also display in landscape mode, making it difficult or impossible for users to complete purchases. The checkout UI is designed for portrait orientation and doesn't work well in landscape.Solution
The StashNative SDK already supports forcing portrait orientation via the
forcePortraitflag inStashNativeCardConfig. This PR documents when and how partners should use this existing feature.Changes
Documentation (
README.md)OpenCard()example showing how to useforcePortraitwhen game is locked to landscapeforcePortraitfield description in the API reference to clarify when it's neededallowedAutorotateToPortrait: 1)Sample Code (
StashSample.cs)OpenCard()method explaining when to uncommentforcePortrait = trueGenerateLinkAndOpen()methodforcePortraitcommented out by default (partners enable it if needed)Requirements
allowedAutorotateToPortrait: 1inProjectSettings.asset)defaultScreenOrientation: 4)Usage
Partners with landscape-locked games should: