Exemplo n.º 1
0
 void OnDestroy()
 {
     if (ApplicationStatusDetector.IsOrientationRotatable() && ApplicationStatusDetector.IsInstantiated())
     {
         ApplicationStatusDetector.Instance.OnChangeOrientation.RemoveListener(OnChangeOrientation);
     }
 }
Exemplo n.º 2
0
        void Start()
        {
            ApplySafeArea();

            if (ApplicationStatusDetector.IsOrientationRotatable())
            {
                ApplicationStatusDetector.Instance.OnChangeOrientation.AddListener(OnChangeOrientation);
            }
        }