Exemplo n.º 1
0
 /// <summary>
 /// Unregister from callbacks.
 /// </summary>
 private void TearDownCallbacks()
 {
     miniManager.OnQRAdded      -= OnQRCodeAdded;
     miniManager.OnQRUpdated    -= OnQRCodeUpdated;
     miniManager.OnQRRemoved    -= OnQRCodeRemoved;
     miniManager.OnQREnumerated -= OnQRCodeEnumerated;
     miniManager = null;
     SimpleConsole.AddLine(trace, "Callbacks torn down");
 }
Exemplo n.º 2
0
 /// <summary>
 /// Ensure all required components exist and cache references where appropriate.
 /// </summary>
 private void CheckComponents()
 {
     if (miniManager == null)
     {
         miniManager = GetComponent <QRCodeMiniManager>();
     }
     if (orienter == null)
     {
         if (sharedOrienter == null)
         {
             orienter = gameObject.AddComponent <Orienter>();
         }
         else
         {
             orienter = sharedOrienter;
         }
     }
 }