Skip to content

Instantly share code, notes, and snippets.

@RimuruDev
Last active June 15, 2024 09:09
Show Gist options
  • Save RimuruDev/3db63d1d61467cb2584a0561a9839407 to your computer and use it in GitHub Desktop.
Save RimuruDev/3db63d1d61467cb2584a0561a9839407 to your computer and use it in GitHub Desktop.
Яндекс игры - как определить устройство? Ссылка на готовое решение - https://github.com/RimuruDev/Unity-WEBGL-DeviceTypeDetector
// ReSharper disable All
// **************************************************************** //
//
// Copyright (c) RimuruDev. All rights reserved.
// Contact me: rimuru.dev@gmail.com
//
// **************************************************************** //
using UnityEngine;
public sealed class DetectDeviceType : MonoBehaviour
{
private void Awake()
{
if(Application.isMobilePlatform)
Debug.Log("Open in Phone");
else
Debug.Log("Open in PC");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment