Skip to content

Instantly share code, notes, and snippets.

@chenkevin
chenkevin / AdMobUtility.cs
Created May 10, 2022 03:53 — forked from pantone170145/AdMobUtility.cs
AdMob test device ID acquisition for Unity (Checked unity version: 5.2.3p2)
using UnityEngine;
using Cryptography = System.Security.Cryptography;
using System.Text;
#if UNITY_IOS
using UnityEngine.iOS;
#endif
/// <summary>
/// AdMobUtility
@chenkevin
chenkevin / DeviceOrientationManager.cs
Created September 16, 2022 03:21 — forked from yasirkula/DeviceOrientationManager.cs
Easily enable/disable auto screen orientation in Unity and receive callback upon orientation change. See the comments section below for instructions.
using UnityEngine;
public class DeviceOrientationManager : MonoBehaviour
{
private const float ORIENTATION_CHECK_INTERVAL = 0.5f;
private float nextOrientationCheckTime;
private static ScreenOrientation m_currentOrientation;
public static ScreenOrientation CurrentOrientation