mobile device ratio

This commit is contained in:
2024-02-27 18:16:16 +05:00
parent 50c24be8b1
commit c038ea32bd
6 changed files with 4206 additions and 463 deletions
+2 -1
View File
@@ -23,7 +23,7 @@ const MobileApartmentPage = () => {
const { unityProvider, sendMessage, addEventListener, removeEventListener } =
useUnity();
const [isContainerLoaded, setIsContainerLoaded] = useState(false);
const isDeviceSupported = !(Number(osVersion) < 17 && isIOS);
const isDeviceSupported = (Number(osVersion) > 17 && isIOS) || !isIOS;
useEffect(() => {
if (!isDeviceSupported) {
@@ -85,6 +85,7 @@ const MobileApartmentPage = () => {
<ButtonPanel />
{isDeviceSupported && (
<Unity
devicePixelRatio={2}
unityProvider={unityProvider}
style={{ width: "100vw", height: "100vh" }}
/>