Rendering on mobile #430
Unanswered
tabdon
asked this question in
Help Wanted!
Replies: 1 comment
-
/ A function which will update the device pixel ratio of the Unity
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Would love some help figuring out how to adjust the game screen dimensions for mobile. I've looked at the other conversations on the topic but haven't found a solution.
Here's the build of the game using the default Unity HTML file. View this on mobile, and you'll see that the game is adjusted correctly to fill the height and width. Please wait for the game to download (it's on S3 in Singapore).
http://pfx-static.s3-website-ap-southeast-1.amazonaws.com/
Here's the build of the game using react-unity-webgl. Note that it doesn't change it's view correctly.
http://pfx-tennis.s3-website-ap-southeast-1.amazonaws.com/tennis
I tried to implement the
devicePixelRatio
solution per the docs, but it has no effect. There may be something wrong with those docs as thehandleChangePixelRatio
const is never used.Here's my full component (simplified):
Beta Was this translation helpful? Give feedback.
All reactions